Solutions - Week 8
Solutions - Week 8
Tutorial Solutions :8
Topics : Confidence Interval
Notice that the 99% CI is wider than the 90% CI. The intuition should be clear: a higher
probability of correctness (i.e., the CI captures the μ) would call for a wider interval. It’s
like when you’re shooting a target afar using a shotgun, you would need a gun with a
wider shooting spread to get a higher kill rate. From an estimation standpoint, however,
a wider interval provides less precise information—so there is a trade-off between
confidence level and precision.
4.
(1) Using R command
> n=length(ChickWeight$weight[ChickWeight$Time==10])
> x_bar=mean(ChickWeight$weight[ChickWeight$ Time==10])
> S=sd(ChickWeight$weight[ChickWeight$ Time==10])
> x_bar-S/sqrt(n)*qt(0.95,n-1)
102.0893
>x_bar+S/sqrt(n)*qt(0.95,n-1)
113.5842
The 90% CI is [102.0893, 113.5842] grams.
You can use ?t.test to see the help file for t.test.
(2)
> n=length(ChickWeight$weight[ChickWeight$Time==0])
>x_bar=mean(ChickWeight$weight[ChickWeight$ Time==0])
>S=sd(ChickWeight$weight[ChickWeight$ Time==0])
>x_bar-S/sqrt(n)*qt(0.975,n-1)
40.73821
>x_bar+S/sqrt(n)*qt(0.975,n-1)
41.38179
The 95% CI is [40.73821, 41.38179] grams
5.
The CI with endpoints and will be a confidence
X n−Z 0.975 σ / √ n X n+ Z 0.975 σ / √ n
interval for μ with confidence coefficient 0.95. The length of this interval will be
Tutorial Solutions 8 Page 2
Nanyang Business School
( )
2
6. (1) (Z ¿ 0.975∗σ )≤ 5 ¿, so Z 0.975∗20.6 , rounded up to 66.
¿ n≥ =65 .21
√n 5
( )
2
(2) (Z ¿ 0.975∗σ )≤ 5 ¿ ,so Z 0.975∗12.8 , rounded up to 26.
¿ n≥ =25.18
√n 5
(3) With higher standard deviation, Industry A requires a larger sample size to achieve the
same absolute error.
One key takeaway from Q5 & Q6 is that “a larger sample size” in general makes a CI
narrower, producing a more precise estimate.
(2)
We can easily see its total length is longer than the 95% CI. Why? Given the same sample
size (the amount of the information), the CI must be wider to have a higher probability to
capture the population mean.
(3) A larger sample would make the CI narrower. This is good! Because, for a given
probability (95% in this case), we would prefer a more precise estimate (narrower CI).
We can have this by increasing the sample size.