Skip to content

Commit

Permalink
run spell checks
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherkenny committed Jul 5, 2024
1 parent fd6c57f commit b2d35fe
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion 01_warmup.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ For a review, please see Section @sec-derivintro - @sec-derivpoly

## Optimization {.unnumbered}

For each of the followng functions $f(x)$, does a maximum and minimum exist in the domain $x \in \mathbf{R}$? If so, for what are those values and for which values of $x$?
For each of the following functions $f(x)$, does a maximum and minimum exist in the domain $x \in \mathbf{R}$? If so, for what are those values and for which values of $x$?

1. $f(x) = x$
2. $f(x) = x^2$
Expand Down
8 changes: 4 additions & 4 deletions 04_calculus.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ The chain rule can be thought of as the derivative of the "outside" times the de
Find $f^\prime(x)$ for $f(x) = (3x^2+5x-7)^6$.
:::

The direct use of a chain rule is when the exponent of is itself a function, so the power rule could not have applied generaly:
The direct use of a chain rule is when the exponent of is itself a function, so the power rule could not have applied generally:

**Generalized Power Rule**:

Expand All @@ -221,7 +221,7 @@ If $f(x)=[g(x)]^p$ for any rational number $p$, $$f^\prime(x) =p[g(x)]^{p-1}g^\p
Natural logs and exponents (they are inverses of each other; see Section @sec-logexponents) crop up everywhere in statistics. Their derivative is a special case from the above, but quite elegant.

::: {#thm-derivexplog}
The functions $e^x$ and the natural logarithm $\log(x)$ are continuous and differentiable in their domains, and their first derivate is $$(e^x)^\prime = e^x$$ $$\log(x)^\prime = \frac{1}{x}$$
The functions $e^x$ and the natural logarithm $\log(x)$ are continuous and differentiable in their domains, and their first derivative is $$(e^x)^\prime = e^x$$ $$\log(x)^\prime = \frac{1}{x}$$

Also, when these are composite functions, it follows by the generalized power rule that

Expand Down Expand Up @@ -380,7 +380,7 @@ Suppose $f(x,y)=x^2+y^2$. Then
:::

::: {#exr-partialderivs}
Let $f(x,y)=x^3 y^4 +e^x -\log y$. What are the following partial derivaitves?
Let $f(x,y)=x^3 y^4 +e^x -\log y$. What are the following partial derivatives?

```{=tex}
\begin{align*}
Expand Down Expand Up @@ -606,7 +606,7 @@ The area-interpretation of the definite integral provides some rules for simplif
::: {#exr-defintshort}
## Definite integral shortcuts

Simplify the following definite intergrals.
Simplify the following definite integrals.

1. $\int\limits_1^1 3x^2 dx =$
2. $\int\limits_0^4 (2x+1)dx=$
Expand Down
2 changes: 1 addition & 1 deletion 05_optimization.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ $$g_i^\star = {U_g}^{-1}\left(\frac{y_i}{E(y)}\right)$$

Now recall that because we assumed concavity, $U_g$ is a negative sloping function whose value is positive. It can be shown that the inverse of such a function is also decreasing. Thus an individual's preferred level of government is determined by a single continuum, the person's income divided by the average income, and the function is **decreasing** in $y_i$. This is consistent with our intuition that richer people prefer less redistribution.

That was the amount for any given person. The government has to set one value of $g$, however. So what will that be? Now we will use another result, the median voter theorem. This says that under certain general electoral conditions (single-peaked preferences, two parties, majority rule), the policy winner will be that preferred by the median person in the population. Because the only thing that determines a person's preferred level of government is $y_i / E(y)$, we can presume that the median voter, whose income is $\text{med}(y)$ will prevail in their preferred choice of government. Therefore, we wil see
That was the amount for any given person. The government has to set one value of $g$, however. So what will that be? Now we will use another result, the median voter theorem. This says that under certain general electoral conditions (single-peaked preferences, two parties, majority rule), the policy winner will be that preferred by the median person in the population. Because the only thing that determines a person's preferred level of government is $y_i / E(y)$, we can presume that the median voter, whose income is $\text{med}(y)$ will prevail in their preferred choice of government. Therefore, we will see

$$g^\star = {U_g}^{-1}\left(\frac{\text{med}(y)}{E(y)}\right)$$

Expand Down
4 changes: 2 additions & 2 deletions 11_data-handling_counting.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The **Console** is kind of a the core window through which you see your GUI actu

4. You can also open scripts that are in folders in your computer. A script is a type of File. Find your Files in the bottom-right "Files" pane.

To load a dataset, you need to specify where that file is. Computer files (data, documents, programs) are organized hiearchically, like a branching tree. Folders can contain files, and also other folders. The GUI toolbar makes this lineaer and hiearchical relationship apparent. When we turn to locate the file in our commands, we need another set of syntax. Importantly, denote the hierarchy of a folder by the `/` (slash) symbol. `data/input/2018-08` indicates the `2018-08` folder, which is included in the `input` folder, which is in turn included in the `data` folder.
To load a dataset, you need to specify where that file is. Computer files (data, documents, programs) are organized hierarchically, like a branching tree. Folders can contain files, and also other folders. The GUI toolbar makes this lineaer and hierarchical relationship apparent. When we turn to locate the file in our commands, we need another set of syntax. Importantly, denote the hierarchy of a folder by the `/` (slash) symbol. `data/input/2018-08` indicates the `2018-08` folder, which is included in the `input` folder, which is in turn included in the `data` folder.

Files (but not folders) have "file extensions" which you are probably familiar with already: `.docx`, `.pdf`, and `.pdf`. The file extensions you will see in a stats or quantitative social science class are:

Expand Down Expand Up @@ -295,7 +295,7 @@ These `tidyverse` commands from the `dplyr` package are newer and not built-in,

Although this is a bit beyond our current stage, it's hard to resist the temptation to see what you can do with data like this. For example, you can map it.[^11_data-handling_counting-5]

[^11_data-handling_counting-5]: In mid-2018, changes in Google's services made it no longer possible to render maps on the fly. Therefore, the map is not currently rendered automatically (but can be rendered once the user registers their API). Instead, you now need to register with Google. See the [change](https://github.com/dkahle/ggmap/blob/e55c0b22b0d16a010b4b45dd2fce800ff0ef19b8/NEWS#L6-L12) to the pacakge ggmap.
[^11_data-handling_counting-5]: In mid-2018, changes in Google's services made it no longer possible to render maps on the fly. Therefore, the map is not currently rendered automatically (but can be rendered once the user registers their API). Instead, you now need to register with Google. See the [change](https://github.com/dkahle/ggmap/blob/e55c0b22b0d16a010b4b45dd2fce800ff0ef19b8/NEWS#L6-L12) to the package ggmap.

Using the `ggmap` package

Expand Down
2 changes: 1 addition & 1 deletion 15_project-dempeace.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ To start, let's download and merge some data.
#### Task 3: Tabulations and Visualization {.unnumbered}

1. Calculate the mean Polity2 score by year. Plot the result. Use graphical indicators of your choosing to show where key events fall in this timeline (such as 1914, 1929, 1939, 1989, 2008). Speculate on why the behavior from 1800 to 1920 seems to be qualitatively different than behavior afterwards.
2. Do the same but only among state-years that were invovled in a MID. Plot this line together with your results from 1.
2. Do the same but only among state-years that were involved in a MID. Plot this line together with your results from 1.
3. Do the same but only among state years that were *not* involved in a MID.
4. Arrive at a tentative conclusion for how well the Democratic Peace argument seems to hold up in this dataset. Visualize this conclusion.

Expand Down

0 comments on commit b2d35fe

Please sign in to comment.