Skip to content
2 changes: 1 addition & 1 deletion manuscript/04_expectations.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ concentrated its density / mass function is around the population mean.
1. A standard die takes the values 1, 2, 3, 4, 5, 6 with equal probability. What is the expected value?
2. Consider a density that is uniform from -1 to 1. (I.e. has height equal to 1/2 and looks like a box starting at -1 and ending at 1). What is the mean of this distribution?
3. If a population has mean {$$}\mu{/$$}, what is the mean of the distribution of averages of 20 observations from this distribution?
4. You are playing a game with a friend where you flip a coin and if it comes up heads you give her {$$}X{/$$} dollars and if it comes up tails she gives you $Y$ dollars. The odds that the coin is heads is {$$}d{/$$}. What is your expected earnings? [Watch a video of the solution to this problem](http://youtu.be/5J88Zq0q81o?list=PLpl-gQkQivXhHOcVeU3bSJg78zaDYbP9L) and [look at the problem and the solution here.](http://bcaffo.github.io/courses/06_StatisticalInference/homework/hw1.html#5).
4. You are playing a game with a friend where you flip a coin and if it comes up heads you give her {$$}X{/$$} dollars and if it comes up tails she gives you {$$}Y{/$$} dollars. The odds that the coin is heads is {$$}d{/$$}. What is your expected earnings? [Watch a video of the solution to this problem](http://youtu.be/5J88Zq0q81o?list=PLpl-gQkQivXhHOcVeU3bSJg78zaDYbP9L) and [look at the problem and the solution here.](http://bcaffo.github.io/courses/06_StatisticalInference/homework/hw1.html#5).
5. If you roll ten standard dice, take their average, then repeat this process over and over and construct a histogram what would it be centered at?
[Watch a video solution here](https://www.youtube.com/watch?v=ia3n2URiJaw&index=16&list=PLpl-gQkQivXhHOcVeU3bSJg78zaDYbP9L)
and [see the original problem here](http://bcaffo.github.io/courses/06_StatisticalInference/homework/hw2.html#11).
4 changes: 2 additions & 2 deletions manuscript/05_variation.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ The sample variance is (almost) the average squared deviation
of observations around the sample mean. It is given by

{$$}
S^2 = \frac{\sum_{i=1} (X_i - \bar X)^2}{n-1}
S^2 = \frac{\sum_{i=1}^{n} (X_i - \bar X)^2}{n-1}
{/$$}

The sample standard deviation is the square root of the sample variance.
Expand Down Expand Up @@ -316,7 +316,7 @@ even though we only get one to look at in a given data set.
- The population variance.
- The population mean.
3. I keep drawing samples of size {$$}n{/$$} from a population with variance {$$}\sigma^2{/$$} and taking their average. I do this thousands of times. If I were to take the variance of the collection of averages, about what would it be?
4. You get a random sample of {$$}n{/$$} observations from a population and take their average. You would like to estimate the variability of averages of $$n$$ observations from this population to better understand how precise of an estimate it is. Do you need to repeated collect averages to do this?
4. You get a random sample of {$$}n{/$$} observations from a population and take their average. You would like to estimate the variability of averages of {$$}n{/$$} observations from this population to better understand how precise of an estimate it is. Do you need to repeated collect averages to do this?
- No, we can multiply our estimate of the population variance by {$$}1/n{/$$} to get a good estimate of the variability of the average.
- Yes, you have to get repeat averages.
5. A random variable takes the value -4 with probability .2 and 1 with probability .8. What
Expand Down
10 changes: 5 additions & 5 deletions manuscript/06_common.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ and 3 standard deviations above and below {$$}\mu{/$$}, the population mean.

The most relevant probabilities are.

1. Approximately 68\%, 95\% and 99\% of the normal density lies within 1, 2 and 3 standard deviations from the mean, respectively.
1. Approximately 68%, 95% and 99% of the normal density lies within 1, 2 and 3 standard deviations from the mean, respectively.
2. -1.28, -1.645, -1.96 and -2.33 are the {$$}10^{th}{/$$}, {$$}5^{th}{/$$},
{$$}2.5^{th}{/$$} and {$$}1^{st}{/$$} percentiles of the standard normal
distribution, respectively.
Expand Down Expand Up @@ -180,15 +180,15 @@ is the appropriate standard normal quantile.

To put some context on our previous setting, population
mean BMI for men [is reported as](http://www.ncbi.nlm.nih.gov/pubmed/23675464)
29 {$$}kg/mg^2{/$$} with a
29 {$$}kg/m^2{/$$} with a
standard deviation of 4.73. Assuming normality of BMI, what is the population
{$$}95^{th}{/$$} percentile? The answer is then:

{$$}
29 + 4.73 \times 1.645 = 36.78.
{/$$}

Or alternatively, we could simply type `r qnorm(.95, 29, 4.73)` in R.
Or alternatively, we could simply type `qnorm(.95, 29, 4.73)` in R.

Now let's reverse the process. Imaging asking what's the probability that
a randomly drawn subject from this population has a BMI less than 24.27?
Expand Down Expand Up @@ -218,8 +218,8 @@ standard normal quantiles that the probability of being larger
than 2 standard deviation is 2.5% and 3 standard deviations is far in the tail.
Therefore, we know that the probability has to be smaller than 2.5% and should
be very small. We can obtain it
exactly as `r pnorm(1160, 1020, 50, lower.tail = FALSE)` which is 0.3%. Note
that we can also obtain the probability as `r pnorm(2.8, lower.tail = FALSE)`.
exactly as `pnorm(1160, 1020, 50, lower.tail = FALSE)` which is 0.3%. Note
that we can also obtain the probability as `pnorm(2.8, lower.tail = FALSE)`.

### Example
Consider the previous example again. What number of daily ad clicks
Expand Down