Skip to content

Commit 33f6f39

Browse files
committed
Merge remote-tracking branch 'origin/main' into add-sd
2 parents 854506c + 4d5d492 commit 33f6f39

File tree

11 files changed

+29
-29
lines changed

11 files changed

+29
-29
lines changed

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ dependencies:
66
- anaconda=2022.10
77
- pip
88
- pip:
9-
- jupyter-book==0.14.0
9+
- jupyter-book==0.15.1
1010
# - quantecon-book-theme==0.3.2
1111
# - sphinx-tojupyter==0.2.1
1212
- sphinxext-rediraffe==0.2.7

lectures/about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ not essential.
5353
## Credits
5454

5555
In building this lecture series, we had invaluable assistance from research
56-
assistants at QuantEcon, as well as our QuantEcon colleages. Without their
56+
assistants at QuantEcon, as well as our QuantEcon colleagues. Without their
5757
help this series would not have been possible.
5858

5959
In particular, we sincerely thank and give credit to

lectures/business_cycle.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ kernelspec:
1515

1616
## Overview
1717

18-
This lecture is about illustrateing business cycles in different countries and period.
18+
This lecture is about illustrating business cycles in different countries and period.
1919

2020
The business cycle refers to the fluctuations in economic activity over time. These fluctuations can be observed in the form of expansions, contractions, recessions, and recoveries in the economy.
2121

22-
In this lecture, we will see expensions and contractions of economies from 1960s to the recent pandemic using [World Bank API](https://documents.worldbank.org/en/publication/documents-reports/api).
22+
In this lecture, we will see expansions and contractions of economies from 1960s to the recent pandemic using [World Bank API](https://documents.worldbank.org/en/publication/documents-reports/api).
2323

2424
In addition to what's in Anaconda, this lecture will need the following libraries to get World bank data
2525

@@ -49,7 +49,7 @@ So let's explore how to query data together.
4949

5050
We can use `wb.series.info` with parameter `q` to query available data from the World Bank (`imfpy. searches.database_codes()` in `imfpy`)
5151

52-
For example, GDP growth is a key indicator to show the expension and contraction of level of economic activities.
52+
For example, GDP growth is a key indicator to show the expansion and contraction of level of economic activities.
5353

5454
Let's retrive GDP growth data together
5555

@@ -97,7 +97,7 @@ wb.series.info(q='consumption')
9797
wb.series.info(q='capital account') # TODO: Check if it is to be plotted
9898
```
9999

100-
- international trade volumn
100+
- international trade volume
101101

102102
+++
103103

@@ -342,7 +342,7 @@ def plot_trade(data, title, ylabel, title_pos, ax, g_params, b_params, t_params)
342342
343343
344344
fig, ax = plt.subplots()
345-
title = 'United States (International Trade Volumn)'
345+
title = 'United States (International Trade Volume)'
346346
ylabel = 'US Dollars, Millions'
347347
plot_UStrade = plot_trade(trade_us[['Period', 'Twoway Trade']], title, ylabel, 0.05, ax, g_params, b_params, t_params)
348348
```
@@ -352,7 +352,7 @@ fig, ax = plt.subplots()
352352
trade_cn = dots('CN','W00', 1960, 2020, freq='A')
353353
354354
trade_cn['Period'] = trade_cn['Period'].astype('int')
355-
title = 'China (International Trade Volumn)'
355+
title = 'China (International Trade Volume)'
356356
ylabel = 'US Dollars, Millions'
357357
plot_trade_cn = plot_trade(trade_cn[['Period', 'Twoway Trade']], title, ylabel, 0.05, ax, g_params, b_params, t_params)
358358
```
@@ -362,7 +362,7 @@ fig, ax = plt.subplots()
362362
trade_mx = dots('MX','W00', 1960, 2020, freq='A')
363363
364364
trade_mx['Period'] = trade_mx['Period'].astype('int')
365-
title = 'Mexico (International Trade Volumn)'
365+
title = 'Mexico (International Trade Volume)'
366366
ylabel = 'US Dollars, Millions'
367367
plot_trade_mx = plot_trade(trade_mx[['Period', 'Twoway Trade']], title, ylabel, 0.05, ax, g_params, b_params, t_params)
368368
```
@@ -372,7 +372,7 @@ fig, ax = plt.subplots()
372372
trade_ar = dots('AR','W00', 1960, 2020, freq='A')
373373
374374
trade_ar['Period'] = trade_ar['Period'].astype('int')
375-
title = 'Argentina (International Trade Volumn)'
375+
title = 'Argentina (International Trade Volume)'
376376
ylabel = 'US Dollars, Millions'
377377
plot_trade_ar = plot_trade(trade_ar[['Period', 'Twoway Trade']], title, ylabel, 0.05, ax, g_params, b_params, t_params)
378378
```

lectures/cobweb.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ You can imagine how these dynamics could cause cycles in prices and quantities
4949
that persist over time.
5050

5151
The cobweb model puts these ideas into equations so we can try to quantify
52-
them, and to study conditions underw which cycles persist (or disappear).
52+
them, and to study conditions under which cycles persist (or disappear).
5353

5454
In this lecture, we investigate and simulate the basic model under different
5555
assumptions regarding the way that produces form expectations.

lectures/lln_clt.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ This means that the distribution of $\bar X_n$ does not eventually concentrate o
358358

359359
Hence the LLN does not hold.
360360

361-
The LLN fails to hold here because the assumpton $\mathbb E|X| = \infty$ is violated by the Cauchy distribution.
361+
The LLN fails to hold here because the assumption $\mathbb E|X| = \infty$ is violated by the Cauchy distribution.
362362

363363
+++
364364

@@ -650,7 +650,7 @@ $$
650650
$$
651651

652652
Finally, since both $X_t$ and $\epsilon_0$ are normally distributed and
653-
independent from each other, any linear combinary of these two variables is
653+
independent from each other, any linear combination of these two variables is
654654
also normally distributed.
655655

656656
We have now shown that

lectures/long_run_growth.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ ax.set_ylabel("GDP per capita (current US$) ")
148148

149149
### Plot for lower middle income and low income
150150

151-
Finally, we compare time-series graphs of GDP per capita between a lower middle income country and a low income country. Again, keeping Pakistan fixed in our set as a lower middle income country, we choose Democratic Republic of Congo as our second country from a low income group. Congo is chosen for no particular reason apart from its unstable political atmoshpere and a dwindling economy.
152-
On comapring we see quite a bit of difference between these countries. With Pakistan's GDP per capita being almost four times as much. Further strengthning our assumption that countries from different income groups can be quite different.
151+
Finally, we compare time-series graphs of GDP per capita between a lower middle income country and a low income country. Again, keeping Pakistan fixed in our set as a lower middle income country, we choose Democratic Republic of Congo as our second country from a low income group. Congo is chosen for no particular reason apart from its unstable political atmosphere and a dwindling economy.
152+
On comparing we see quite a bit of difference between these countries. With Pakistan's GDP per capita being almost four times as much. Further strengthening our assumption that countries from different income groups can be quite different.
153153

154154
```{code-cell} ipython3
155155
# Pakistan, Congo (Lower middle income, low income)

lectures/lp_intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ By deploying the following steps, any linear programming problem can be transfor
412412
413413
1. **Objective Function:** If a problem is originally a constrained **maximization** problem, we can construct a new objective function that is the additive inverse of the original objective function. The transformed problem is then a **minimization** problem.
414414
415-
2. **Decision Variables:** Given a variable $x_j$ satisfying $x_j \le 0$, we can introduce a new variable $x_j' = - x_j$ and subsitute it into original problem. Given a free variable $x_i$ with no restriction on its sign, we can introduce two new variables $x_j^+$ and $x_j^-$ satisfying $x_j^+, x_j^- \ge 0$ and replace $x_j$ by $x_j^+ - x_j^-$.
415+
2. **Decision Variables:** Given a variable $x_j$ satisfying $x_j \le 0$, we can introduce a new variable $x_j' = - x_j$ and substitute it into original problem. Given a free variable $x_i$ with no restriction on its sign, we can introduce two new variables $x_j^+$ and $x_j^-$ satisfying $x_j^+, x_j^- \ge 0$ and replace $x_j$ by $x_j^+ - x_j^-$.
416416
417417
3. **Inequality constraints:** Given an inequality constraint $\sum_{j=1}^n a_{ij}x_j \le 0$, we can introduce a new variable $s_i$, called a **slack variable** that satisfies $s_i \ge 0$ and replace the original constraint by $\sum_{j=1}^n a_{ij}x_j + s_i = 0$.
418418

lectures/schelling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def plot_distribution(agents, cycle_num):
260260
And here's some pseudocode for the main loop, where we cycle through the
261261
agents until no one wishes to move.
262262

263-
The psueudo code is
263+
The pseudocode is
264264

265265
```{code-block} none
266266
plot the distribution

lectures/sd_foundations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ We shall eventually describe two classic welfare theorems:
2929

3030
* **first welfare theorem:** for a given a distribution of wealth among consumers, a competitive equilibrium allocation of goods solves a social planning problem.
3131

32-
* **second welfare theorem:** An allocation of goods to consumers that solves a social planning problem can be supported by a compeitive equilibrium with an appropriate initial distribution of wealth.
32+
* **second welfare theorem:** An allocation of goods to consumers that solves a social planning problem can be supported by a competitive equilibrium with an appropriate initial distribution of wealth.
3333

3434
Key infrastructure concepts that we'll encounter in this lecture are
3535

@@ -126,7 +126,7 @@ supply to demand brings us a **key finding:**
126126
127127
It also brings a useful **competitive equilibrium computation strategy:**
128128
129-
* after solving the welfare problem for an optimal quantity, we can read a competive equilibrium price from either supply price or demand price at the competitive equilibrium quantity
129+
* after solving the welfare problem for an optimal quantity, we can read a competitive equilibrium price from either supply price or demand price at the competitive equilibrium quantity
130130
131131
Soon we'll derive generalizations of the above demand and supply
132132
curves from other objects.

lectures/simple_linear_regression.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Let us consider a simple dataset of 10 observations for variables $x_i$ and $y_i
4444
|9| 1800 | 27 |
4545
|10 | 250 | 2 |
4646

47-
Let us think about $y_i$ as sales for an ice-cream cart, while $x_i$ is a variable that records the day's temperature in Celcius.
47+
Let us think about $y_i$ as sales for an ice-cream cart, while $x_i$ is a variable that records the day's temperature in Celsius.
4848

4949
```{code-cell} ipython3
5050
x = [32, 21, 24, 35, 10, 11, 22, 21, 27, 2]
@@ -54,7 +54,7 @@ df.columns = ['X', 'Y']
5454
df
5555
```
5656

57-
We can use a scatter plot of the data to see the relationship between $y_i$ (ice-cream sales in dollars (\$\'s)) and $x_i$ (degrees celcius).
57+
We can use a scatter plot of the data to see the relationship between $y_i$ (ice-cream sales in dollars (\$\'s)) and $x_i$ (degrees Celsius).
5858

5959
```{code-cell} ipython3
6060
ax = df.plot(
@@ -407,9 +407,9 @@ df.dropna(inplace=True)
407407
df
408408
```
409409
410-
We have now droped the number of rows in our DataFrame from 62156 to 12445 removing a lot of empty data relationships.
410+
We have now dropped the number of rows in our DataFrame from 62156 to 12445 removing a lot of empty data relationships.
411411
412-
Now we have a dataset containing life expectency and GDP per capita for a range of years.
412+
Now we have a dataset containing life expectancy and GDP per capita for a range of years.
413413
414414
It is always a good idea to spend a bit of time understanding what data you actually have.
415415
@@ -458,8 +458,8 @@ df.plot(x='gdppc', y='life_expectency', kind='scatter', xlabel="GDP per capita"
458458
459459
This data shows a couple of interesting relationships.
460460
461-
1. there are a number of countries with similar GDP per capita levels but a wide range in Life Expectency
462-
2. there appears to be a positive relationship between GDP per capita and life expectency. Countries with higher GDP per capita tend to have higher life expectency outcomes
461+
1. there are a number of countries with similar GDP per capita levels but a wide range in Life Expectancy
462+
2. there appears to be a positive relationship between GDP per capita and life expectancy. Countries with higher GDP per capita tend to have higher life expectency outcomes
463463
464464
Even though OLS is solving linear equations -- one option we have is to transform the variables, such as through a log transform, and then use OLS to estimate the transformed variables
465465
@@ -470,7 +470,7 @@ ln -> ln == elasticities
470470
By specifying `logx` you can plot the GDP per Capita data on a log scale
471471
472472
```{code-cell} ipython3
473-
df.plot(x='gdppc', y='life_expectency', kind='scatter', xlabel="GDP per capita", ylabel="Life Expectency (Years)", logx=True);
473+
df.plot(x='gdppc', y='life_expectency', kind='scatter', xlabel="GDP per capita", ylabel="Life Expectancy (Years)", logx=True);
474474
```
475475
476476
As you can see from this transformation -- a linear model fits the shape of the data more closely.
@@ -488,7 +488,7 @@ df
488488
```{code-cell} ipython3
489489
data = df[['log_gdppc', 'life_expectency']].copy() # Get Data from DataFrame
490490
491-
# Calcuate the sample means
491+
# Calculate the sample means
492492
x_bar = data['log_gdppc'].mean()
493493
y_bar = data['life_expectency'].mean()
494494
```

0 commit comments

Comments
 (0)