diff --git a/source/sec-Confidence-Intervals.ptx b/source/sec-Confidence-Intervals.ptx
index 6605c34..5e8f45b 100644
--- a/source/sec-Confidence-Intervals.ptx
+++ b/source/sec-Confidence-Intervals.ptx
@@ -2,28 +2,37 @@
Confidence Intervals
- When estimating the value of some parameter, the maximum likelihood estimation provides the single estimate with highest possible likelihood.
- But we might prefer to have a range of values, with some quantitative measure of how certain we are that the true parameter value could be in the range.
+ When estimating the value of some parameter, the maximum likelihood
+ estimation provides the single estimate with highest possible likelihood.
+ But we might prefer to have a range of values, with some quantitative
+ measure of how certain we are that the true parameter value could be in the
+ range.
- Suppose some measurement has a mean \mu and variance \sigma^2 across the entire population.
- Independent measurements X_1, X_2, \dotsc, X_n and calculate the sample mean
+ Suppose some measurement has a mean \mu and variance \sigma^2
+ across the entire population.
+ Independent measurements X_1, X_2, \dotsc, X_n and calculate the
+ sample mean
A_n = \frac{X_1 + \dotsb + X_n}{n}.
- Then, according to , A_n \approx \Norm\left(\mu, \frac{\sigma^2}{n}\right) as long as we take a sufficient number of measurements.
+ Then, according to ,
+ A_n \approx \Norm\left(\mu, \frac{\sigma^2}{n}\right) as long as we
+ take a sufficient number of measurements.
However, we don't have access to the true values of \mu, \sigma^2.
- We can make an estimate s^2 of \sigma^2 from the collected data, so we know how spread out the normal distribution should be.
+ We can make an estimate s^2 of \sigma^2 from the collected
+ data, so we know how spread out the normal distribution should be.
- Let X_1, X_2, \dotsc, X_n be independent samples taken from a population.
+ Let X_1, X_2, \dotsc, X_n be independent samples taken from a
+ population.
Let A_n = \frac{X_1 + \dotsb + X_n}{n} be the sample mean.
The sample variance is:
@@ -39,26 +48,35 @@
- Note that s^2 is an estimate of the variance of each individual measurement X_i taken from the population.
- Therefore, \frac{s^2}{n} is an estimate of the variance of the mean A_n.
- Hence "standard error of the mean" is an estimate of the standard deviation of the mean.
+ Note that s^2 is an estimate of the variance of each individual
+ measurement X_i taken from the population.
+ Therefore, \frac{s^2}{n} is an estimate of the variance of the mean
+ A_n.
+ Hence "standard error of the mean" is an estimate of the standard deviation
+ of the mean.
- Next, we want to pick a distance c so that our measured sample mean A_n is within c of the true population mean \mu with a high probability.
- We can pick some value \alpha \in (0, 1), and let c_{\alpha} = \Phi^{-1}\left(1 - \frac{\alpha}{2}\right).
+ Next, we want to pick a distance c so that our measured sample mean
+ A_n is within c of the true population mean \mu with a
+ high probability.
+ We can pick some value \alpha \in (0, 1), and let
+ c_{\alpha} = \Phi^{-1}\left(1 - \frac{\alpha}{2}\right).
Then the interval:
\left[A_n - c_{\alpha} \left(\frac{s}{\sqrt{n}}\right), A_n + c_{\alpha} \left(\frac{s}{\sqrt{n}}\right)\right]
- is called a confidence interval with confidence level 1 - \alpha.
+ is called a confidence interval with confidence level
+ 1 - \alpha.
- Let X_1, X_2, \dotsc, X_n be independent samples taken from a population.
- Suppose A_n is the sample mean and s^2 the sample variance.
+ Let X_1, X_2, \dotsc, X_n be independent samples taken from a
+ population.
+ Suppose A_n is the sample mean and s^2 the sample
+ variance.
Then the 95% confidence limits are:
\mu_{\ell} \amp = A_n - 1.96 \left(\frac{s}{\sqrt{n}}\right)
@@ -71,10 +89,13 @@
- Suppose measurements are taken of the heights of several plants in a garden plot.
+ Suppose measurements are taken of the heights of several plants in a
+ garden plot.
The measurements are given below.
- (Note: for the sake of a managable calculation, only five measurements are given.
- However, for to apply, the number of measurements would need to be greater.)
+ (Note: for the sake of a managable calculation, only five measurements
+ are given.
+ However, for to apply, the number of measurements
+ would need to be greater.)
@@ -140,10 +161,16 @@
- If the individual measurements X_1, \dotsc, X_n are indicator random variables, then the mean A_n represents the proportion which take on the value 1.
- For example, if the X_i's indicate heads on coin flips, then A_n represents the proportion which come up heads.
- In this setting, we have a nice shortcut formula () for the variance of S_n = X_1 + \dotsc + X_n.
- We can make use of this formula to get the variance of A_n without going through the sample variance calculation above:
+ If the individual measurements X_1, \dotsc, X_n are indicator random
+ variables, then the mean A_n represents the proportion which take on
+ the value 1.
+ For example, if the X_i's indicate heads on coin flips, then
+ A_n represents the proportion which come up heads.
+ In this setting, we have a nice shortcut formula
+ () for the variance of
+ S_n = X_1 + \dotsc + X_n.
+ We can make use of this formula to get the variance of A_n without
+ going through the sample variance calculation above:
\Var(S_n) \amp = np(1 - p)
\Var(A_n) \amp = \Var\left(\frac{S_n}{n}\right)
@@ -151,14 +178,16 @@
\amp = \frac{1}{n^2} (np(1 - p))
\amp = \frac{p(1 - p)}{n}.
- Since we won't have access to the true value of p, we can use the maximum likelihood estimate \widehat{p}.
+ Since we won't have access to the true value of p, we can use the
+ maximum likelihood estimate \widehat{p}.
Suppose in a sample of 100 people, 40 have a particular trait.
- The maximum likelihood estimate for the probability p of a random person having the trait is \widehat{p} = \frac{40}{100} = 0.4.
+ The maximum likelihood estimate for the probability p of a random
+ person having the trait is \widehat{p} = \frac{40}{100} = 0.4.
So the standard error will be:
\sqrt{\frac{(0.4)(1 - 0.4)}{100}} = \sqrt{\frac{0.24}{100}} \approx 0.049.
@@ -173,162 +202,206 @@
-
-
-
- Suppose we flip a coin 100 times and count 60 heads.
- Let p be the (unknown) probability that the coin comes up heads on a flip.
- Give an approximate 95% confidence interval for the value of p.
-
-
-
-
-
- [0.504, 0.696].
-
-
-
-
-
-
-
- Suppose in a sample of 100 people, 12 are left-handed.
-
-
-
-
-
+
- Give a 95% confidence interval for the proportion p of left-handed people.
+ Suppose we flip a coin 100 times and count 60 heads.
+ Let p be the (unknown) probability that the coin comes up heads
+ on a flip.
+ Give an approximate 95% confidence interval for the value of p.
- [0.056, 0.184].
+ [0.504, 0.696].
-
+
+
+
+
+ Suppose in a sample of 100 people, 12 are left-handed.
+
+
-
+
+
+
+ Give a 95% confidence interval for the proportion p of
+ left-handed people.
+
+
+
+
+
+ [0.056, 0.184].
+
+
+
+
+
+
+
+ Give a 90% confidence interval.
+
+
+
+
+
+ [0.066, 0.174].
+
+
+
+
+
+
+
+
+ Suppose a sample of measurements are taken, and the sample is found to
+ have a mean of 20.2 with a standard error of 4.3.
+
+
+
+
+
+
+ Find the 95% confidence limits.
+
+
+
+
+
+
+
+ Find the 92% confidence limits.
+
+
+
+
+
+
+
+ Find the 97% confidence limits.
+
+
+
+
+
+
+
+ Find the 99% confidence limits.
+
+
+
+
+
+
- Give a 90% confidence interval.
+ The weights of five mice are measured and recorded below.
+ Give a 95% confidence interval for the sample mean weight of mice.
+ (Pretend 5 measurements is large enough for the CLT to apply.)
+
+
+
+
+
+ | mouse i |
+ weight W_i (g) |
+
+
+
+ | 1 |
+ 26 |
+
+
+
+ | 2 |
+ 32 |
+
+
+
+ | 3 |
+ 33 |
+
+
+
+ | 4 |
+ 20 |
+
+
+
+ | 5 |
+ 29 |
+
+
+
- [0.066, 0.174].
+
+
+ [23.39, 32.61].
-
-
+
-
-
-
- The weights of five mice are measured and recorded below.
- Give a 95% confidence interval for the sample mean weight of mice.
- (Pretend 5 measurements is large enough for the CLT to apply.)
-
+
+
+
+ The heights of five plants are measured and recorded below.
+ Give a 95% confidence interval around the sample mean for the heights
+ of the plants.
+ (Pretend 5 measurements is large enough for the CLT to apply.)
+
-
-
+
+
+
+
+ | plant i |
+ height H_i (in) |
+
-
-
- | mouse i |
- weight W_i (g) |
-
+
+ | 1 |
+ 15 |
+
-
- | 1 |
- 26 |
-
+
+ | 2 |
+ 14 |
+
-
- | 2 |
- 32 |
-
+
+ | 3 |
+ 18 |
+
-
- | 3 |
- 33 |
-
+
+ | 4 |
+ 21 |
+
-
- | 4 |
- 20 |
-
+
+ | 5 |
+ 17 |
+
+
+
+
-
- | 5 |
- 29 |
-
-
-
-
-
-
-
- [23.39, 32.61].
-
-
-
-
-
-
-
- The heights of five plants are measured and recorded below.
- Give a 95% confidence interval around the sample mean for the heights of the plants.
- (Pretend 5 measurements is large enough for the CLT to apply.)
-
-
-
-
-
-
-
- | plant i |
- height H_i (in) |
-
-
-
- | 1 |
- 15 |
-
-
-
- | 2 |
- 14 |
-
-
-
- | 3 |
- 18 |
-
-
-
- | 4 |
- 21 |
-
-
-
- | 5 |
- 17 |
-
-
-
-
-
-
-
- [14.61, 19.39].
-
-
-
+
+
+
+
+ [14.61, 19.39].
+
+
+
\ No newline at end of file