A national park in Namibia determines the weight (in kg) of a sample of common eland antelopes:
\begin{matrix} 450 & 730 & 700 & 600 & 620 & 660 & 850 & 520 & 490 & 670 & 700 & 820 \\ 910 & 770 & 760 & 620 & 550 & 520 & 590 & 490 & 620 & 660 & 940 & 790 \end{matrix}
Calculate
(a) the point estimate of μ and σ² and
(b) the confidence interval for μ (α = 0.05).
under the assumption that the weight is normally distributed.
(c) Use R to reproduce the results from (b).
(a) The point estimate of μ is \bar{x} which is
\hat{\mu }= \bar{x} =\frac{1}{n} \sum\limits_{i=1}^{n}{x_{i}} =\frac{1}{24}\left(450+ \ldots+790 \right) = 667.92.
The variance of σ² can be estimated unbiasedly using s²:
\hat{\sigma }^{2}=s^{2}=\frac{1}{n-1} \sum\limits_{i=1}^{n}{\left(x_{i}-\bar{x}\right)^{2} }
=\frac{1}{23} \left(\left(450 − 667.92\right)^{2}+ \ldots+ \left(790 − 667.92\right)^{2}\right) \approx 18, 035.
(b) The variance is unknown and needs to be estimated. We thus need the t-distribution to construct the confidence interval. We can determine t_{23;0.975} ≈ 2.07 using qt(0.975,23) or Table C.2 (though the latter is not detailed enough), α = 0.05, \bar{x}= 667.97 and \hat{\sigma }^{2} = 18, 035. This yields
I_{l} (X) = \bar{x} − t_{n−1;{1−α}/{2}}· \frac{s}{\sqrt{n} }= 667.92 − t_{23;0.975} · \frac{\sqrt{18, 035}}{\sqrt{24} } \approx 611.17,
I_{u} (X) = \bar{x} + t_{n−1;{1−α}/{2}}· \frac{s}{\sqrt{n} } 667.92 − t_{23;0.975} · \frac{\sqrt{18, 035}}{\sqrt{24} } \approx 724.66.
The confidence interval for μ is thus [611.17; 724.66].
(c) We can reproduce these results in R as follows:
eland <- c(450,730,700,600,620,,790)
t.test(eland)$conf.int
Table C.2 (1 − α) quantiles for the t-distribution. These values can also be obtained in R using the qt(p,df) command.
d f | 1 − α | |||
0.95 | 0.975 | 0.99 | 0.995 | |
1 | 6.3138 | 12.706 | 31.821 | 63.657 |
2 | 2.9200 | 4.3027 | 6.9646 | 9.9248 |
3 | 2.3534 | 3.1824 | 4.5407 | 5.8409 |
4 | 2.1318 | 2.7764 | 3.7469 | 4.6041 |
5 | 2.0150 | 2.5706 | 3.3649 | 4.0321 |
6 | 1.9432 | 2.4469 | 3.1427 | 3.7074 |
7 | 1.8946 | 2.3646 | 2.9980 | 3.4995 |
8 | 1.8595 | 2.3060 | 2.8965 | 3.3554 |
9 | 1.8331 | 2.2622 | 2.8214 | 3.2498 |
10 | 1.8125 | 2.2281 | 2.7638 | 3.1693 |
11 | 1.7959 | 2.2010 | 2.7181 | 3.1058 |
12 | 1.7823 | 2.1788 | 2.6810 | 3.0545 |
13 | 1.7709 | 2.1604 | 2.6503 | 3.0123 |
14 | 1.7613 | 2.1448 | 2.6245 | 2.9768 |
15 | 1.7531 | 2.1314 | 2.6025 | 2.9467 |
16 | 1.7459 | 2.1199 | 2.5835 | 2.9208 |
17 | 1.7396 | 2.1098 | 2.5669 | 2.8982 |
18 | 1.7341 | 2.1009 | 2.5524 | 2.8784 |
19 | 1.7291 | 2.0930 | 2.5395 | 2.8609 |
20 | 1.7247 | 2.0860 | 2.5280 | 2.8453 |
30 | 1.6973 | 2.0423 | 2.4573 | 2.7500 |
40 | 1.6839 | 2.0211 | 2.4233 | 2.7045 |
50 | 1.6759 | 2.0086 | 2.4033 | 2.6778 |
60 | 1.6706 | 2.0003 | 2.3901 | 2.6603 |
70 | 1.6669 | 1.9944 | 2.3808 | 2.6479 |
80 | 1.6641 | 1.9901 | 2.3739 | 2.6387 |
90 | 1.6620 | 1.9867 | 2.3685 | 2.6316 |
100 | 1.6602 | 1.9840 | 2.3642 | 2.6259 |
200 | 1.6525 | 1.9719 | 2.3451 | 2.6006 |
300 | 1.6499 | 1.9679 | 2.3388 | 2.5923 |
400 | 1.6487 | 1.9659 | 2.3357 | 2.5882 |
500 | 1.6479 | 1.9647 | 2.3338 | 2.5857 |