From 337beaa122709b142029b2393b8f6375afe93cd4 Mon Sep 17 00:00:00 2001 From: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com> Date: Mon, 13 Mar 2023 19:28:25 +0100 Subject: [PATCH] Fix a few typos --- in-work/supply_demand_foundations_v2.md | 16 ++++++++-------- lectures/about.md | 2 +- lectures/business_cycle.md | 16 ++++++++-------- lectures/cobweb.md | 2 +- lectures/lln_clt.md | 6 +++--- lectures/long_run_growth.md | 4 ++-- lectures/lp_intro.md | 2 +- lectures/schelling.md | 2 +- lectures/simple_linear_regression.md | 16 ++++++++-------- lectures/solow.md | 4 ++-- 10 files changed, 35 insertions(+), 35 deletions(-) diff --git a/in-work/supply_demand_foundations_v2.md b/in-work/supply_demand_foundations_v2.md index f1120b6c0..a4dce39d3 100644 --- a/in-work/supply_demand_foundations_v2.md +++ b/in-work/supply_demand_foundations_v2.md @@ -30,7 +30,7 @@ We shall eventually describe two classic welfare theorems: * **first welfare theorem:** for a given a distribution of wealth among consumers, a competitive equilibrium allocation of goods solves a social planning problem. -* **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. +* **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. Key infrastructure concepts that we'll encounter in this lecture are @@ -128,13 +128,13 @@ supply to demand brings us a **key finding:** It also brings a useful **competitive equilibrium computation strategy:** -* 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 +* 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 Soon we'll derive generalizations of the above demand and supply curves from other objects. Our generalizations will extend the preceding analysis of a market for a single good to the analysis -of $n$ simulataneous markets in $n$ goods. +of $n$ simultaneous markets in $n$ goods. In addition @@ -261,7 +261,7 @@ Consider a single-consumer, multiple-goods economy without production. The only source of goods is the single consumer's endowment vector $e$. -A competitive equilibium price vector induces the consumer to choose $c=e$. +A competitive equilibrium price vector induces the consumer to choose $c=e$. This implies that the equilibrium price vector satisfies @@ -293,7 +293,7 @@ where $W$ is measured in "dollars" (or some other **numeraire**) and component $ Whether the consumer's budget constraint is {eq}`eq:old2` or {eq}`eq:old2p` and whether we take $W$ as a free parameter or instead as an endogenous variable will affect the consumer's marginal utility of wealth. -Consequently, how we set $\mu$ determines whether we are constucting +Consequently, how we set $\mu$ determines whether we are constructing * a **Marshallian** demand curve, as when we use {eq}`eq:old2` and solve for $\mu$ using equation {eq}`eq:old4` below, or * a **Hicksian** demand curve, as when we treat $\mu$ as a fixed parameter and solve for $W$ from {eq}`eq:old2p`. @@ -578,7 +578,7 @@ $$ c = (\Pi^\top \Pi + H )^{-1} ( \Pi^\top b - h) $$ (eq:old5) -This equation is the counterpart of equilbrium quantity {eq}`eq:old1` for the scalar $n=1$ model with which we began. +This equation is the counterpart of equilibrium quantity {eq}`eq:old1` for the scalar $n=1$ model with which we began. ### General $\mu\neq 1$ case @@ -671,7 +671,7 @@ Thus, as for the single-good case, with multiple goods a competitive equilib (This is another version of the first welfare theorem.) -We can deduce a competitive equilbrium price vector from either +We can deduce a competitive equilibrium price vector from either * the inverse demand curve, or @@ -761,7 +761,7 @@ $$ c_{i}=\Pi^{-1}b_{i}-(\Pi^{\top}\Pi)^{-1}\mu_{i}p. $$ -## Deducing a represenative consumer +## Deducing a representative consumer In the class of multiple consumer economies that we are studying here, it turns out that there exists a single **representative consumer** whose preferences and endowments can be deduced from lists of preferences and endowments for the separate individual consumers. diff --git a/lectures/about.md b/lectures/about.md index 4f771c3b1..7edd6e932 100644 --- a/lectures/about.md +++ b/lectures/about.md @@ -53,7 +53,7 @@ not essential. ## Credits In building this lecture series, we had invaluable assistance from research -assistants at QuantEcon, as well as our QuantEcon colleages. Without their +assistants at QuantEcon, as well as our QuantEcon colleagues. Without their help this series would not have been possible. In particular, we sincerely thank and give credit to diff --git a/lectures/business_cycle.md b/lectures/business_cycle.md index 70fa5cc1d..a396ab41c 100644 --- a/lectures/business_cycle.md +++ b/lectures/business_cycle.md @@ -15,11 +15,11 @@ kernelspec: ## Overview -This lecture is about illustrateing business cycles in different countries and period. +This lecture is about illustrating business cycles in different countries and period. 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. -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). +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). In addition to what's in Anaconda, this lecture will need the following libraries to get World bank data @@ -49,7 +49,7 @@ So let's explore how to query data together. We can use `wb.series.info` with parameter `q` to query available data from the World Bank (`imfpy. searches.database_codes()` in `imfpy`) -For example, GDP growth is a key indicator to show the expension and contraction of level of economic activities. +For example, GDP growth is a key indicator to show the expansion and contraction of level of economic activities. Let's retrive GDP growth data together @@ -97,7 +97,7 @@ wb.series.info(q='consumption') wb.series.info(q='capital account') # TODO: Check if it is to be plotted ``` -- international trade volumn +- international trade volume +++ @@ -342,7 +342,7 @@ def plot_trade(data, title, ylabel, title_pos, ax, g_params, b_params, t_params) fig, ax = plt.subplots() -title = 'United States (International Trade Volumn)' +title = 'United States (International Trade Volume)' ylabel = 'US Dollars, Millions' plot_UStrade = plot_trade(trade_us[['Period', 'Twoway Trade']], title, ylabel, 0.05, ax, g_params, b_params, t_params) ``` @@ -352,7 +352,7 @@ fig, ax = plt.subplots() trade_cn = dots('CN','W00', 1960, 2020, freq='A') trade_cn['Period'] = trade_cn['Period'].astype('int') -title = 'China (International Trade Volumn)' +title = 'China (International Trade Volume)' ylabel = 'US Dollars, Millions' plot_trade_cn = plot_trade(trade_cn[['Period', 'Twoway Trade']], title, ylabel, 0.05, ax, g_params, b_params, t_params) ``` @@ -362,7 +362,7 @@ fig, ax = plt.subplots() trade_mx = dots('MX','W00', 1960, 2020, freq='A') trade_mx['Period'] = trade_mx['Period'].astype('int') -title = 'Mexico (International Trade Volumn)' +title = 'Mexico (International Trade Volume)' ylabel = 'US Dollars, Millions' plot_trade_mx = plot_trade(trade_mx[['Period', 'Twoway Trade']], title, ylabel, 0.05, ax, g_params, b_params, t_params) ``` @@ -372,7 +372,7 @@ fig, ax = plt.subplots() trade_ar = dots('AR','W00', 1960, 2020, freq='A') trade_ar['Period'] = trade_ar['Period'].astype('int') -title = 'Argentina (International Trade Volumn)' +title = 'Argentina (International Trade Volume)' ylabel = 'US Dollars, Millions' plot_trade_ar = plot_trade(trade_ar[['Period', 'Twoway Trade']], title, ylabel, 0.05, ax, g_params, b_params, t_params) ``` diff --git a/lectures/cobweb.md b/lectures/cobweb.md index 2b51e0295..1ac938290 100644 --- a/lectures/cobweb.md +++ b/lectures/cobweb.md @@ -49,7 +49,7 @@ You can imagine how these dynamics could cause cycles in prices and quantities that persist over time. The cobweb model puts these ideas into equations so we can try to quantify -them, and to study conditions underw which cycles persist (or disappear). +them, and to study conditions under which cycles persist (or disappear). In this lecture, we investigate and simulate the basic model under different assumptions regarding the way that produces form expectations. diff --git a/lectures/lln_clt.md b/lectures/lln_clt.md index d3b18627b..2b8dfe659 100644 --- a/lectures/lln_clt.md +++ b/lectures/lln_clt.md @@ -1,4 +1,4 @@ ---- +s--- jupytext: text_representation: extension: .md @@ -358,7 +358,7 @@ This means that the distribution of $\bar X_n$ does not eventually concentrate o Hence the LLN does not hold. -The LLN fails to hold here because the assumpton $\mathbb E|X| = \infty$ is violated by the Cauchy distribution. +The LLN fails to hold here because the assumption $\mathbb E|X| = \infty$ is violated by the Cauchy distribution. +++ @@ -650,7 +650,7 @@ $$ $$ Finally, since both $X_t$ and $\epsilon_0$ are normally distributed and -independent from each other, any linear combinary of these two variables is +independent from each other, any linear combination of these two variables is also normally distributed. We have now shown that diff --git a/lectures/long_run_growth.md b/lectures/long_run_growth.md index 4753b6cd3..1948322f6 100644 --- a/lectures/long_run_growth.md +++ b/lectures/long_run_growth.md @@ -148,8 +148,8 @@ ax.set_ylabel("GDP per capita (current US$) ") ### Plot for lower middle income and low income -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. -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. +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. +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. ```{code-cell} ipython3 # Pakistan, Congo (Lower middle income, low income) diff --git a/lectures/lp_intro.md b/lectures/lp_intro.md index cf151af56..f9196b4c2 100644 --- a/lectures/lp_intro.md +++ b/lectures/lp_intro.md @@ -412,7 +412,7 @@ By deploying the following steps, any linear programming problem can be transfor 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. -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^-$. +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^-$. 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$. diff --git a/lectures/schelling.md b/lectures/schelling.md index 734e13b01..0c70986c3 100644 --- a/lectures/schelling.md +++ b/lectures/schelling.md @@ -260,7 +260,7 @@ def plot_distribution(agents, cycle_num): And here's some pseudocode for the main loop, where we cycle through the agents until no one wishes to move. -The psueudo code is +The pseudocode is ```{code-block} none plot the distribution diff --git a/lectures/simple_linear_regression.md b/lectures/simple_linear_regression.md index c1f96c684..1ad0c5048 100644 --- a/lectures/simple_linear_regression.md +++ b/lectures/simple_linear_regression.md @@ -44,7 +44,7 @@ Let us consider a simple dataset of 10 observations for variables $x_i$ and $y_i |9| 1800 | 27 | |10 | 250 | 2 | -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. +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. ```{code-cell} ipython3 x = [32, 21, 24, 35, 10, 11, 22, 21, 27, 2] @@ -54,7 +54,7 @@ df.columns = ['X', 'Y'] df ``` -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). +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). ```{code-cell} ipython3 ax = df.plot( @@ -407,9 +407,9 @@ df.dropna(inplace=True) df ``` -We have now droped the number of rows in our DataFrame from 62156 to 12445 removing a lot of empty data relationships. +We have now dropped the number of rows in our DataFrame from 62156 to 12445 removing a lot of empty data relationships. -Now we have a dataset containing life expectency and GDP per capita for a range of years. +Now we have a dataset containing life expectancy and GDP per capita for a range of years. It is always a good idea to spend a bit of time understanding what data you actually have. @@ -458,8 +458,8 @@ df.plot(x='gdppc', y='life_expectency', kind='scatter', xlabel="GDP per capita" This data shows a couple of interesting relationships. -1. there are a number of countries with similar GDP per capita levels but a wide range in Life Expectency -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 +1. there are a number of countries with similar GDP per capita levels but a wide range in Life Expectancy +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 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 @@ -470,7 +470,7 @@ ln -> ln == elasticities By specifying `logx` you can plot the GDP per Capita data on a log scale ```{code-cell} ipython3 -df.plot(x='gdppc', y='life_expectency', kind='scatter', xlabel="GDP per capita", ylabel="Life Expectency (Years)", logx=True); +df.plot(x='gdppc', y='life_expectency', kind='scatter', xlabel="GDP per capita", ylabel="Life Expectancy (Years)", logx=True); ``` As you can see from this transformation -- a linear model fits the shape of the data more closely. @@ -488,7 +488,7 @@ df ```{code-cell} ipython3 data = df[['log_gdppc', 'life_expectency']].copy() # Get Data from DataFrame -# Calcuate the sample means +# Calculate the sample means x_bar = data['log_gdppc'].mean() y_bar = data['life_expectency'].mean() ``` diff --git a/lectures/solow.md b/lectures/solow.md index c14343625..4e091a1b1 100644 --- a/lectures/solow.md +++ b/lectures/solow.md @@ -182,7 +182,7 @@ Then we have $k_{t+1} = g(k_t) > k_t$ and capital per worker rises. If $g(k_t) < k_t$ then capital per worker falls. -If $g(k_t) = k_t$, then we are at a **steady state** and $k_t$ remainds constant. +If $g(k_t) = k_t$, then we are at a **steady state** and $k_t$ remains constant. (A steady state of the model is a [fixed point](https://en.wikipedia.org/wiki/Fixed_point_(mathematics)) of the mapping $g$.) @@ -218,7 +218,7 @@ three distinct initial conditions, under the parameterization listed above. At this parameterization, $k^* \approx 1.78$. -Let's define the constants and three distinct intital conditions +Let's define the constants and three distinct initial conditions ```{code-cell} ipython3 A, s, alpha, delta = 2, 0.3, 0.3, 0.4