The Problem
Example # 9: Estimate the population variance, σ², using a confidence interval to indicate uncertainty. The data are:
101, 54, 77, 88, 85, 65, 57, 101, 74, 89, 74, 65, 91, 62, 83, 70, 49, 63, 40, 86, 91, 76, 70, 96, 82, 86, 89, 86, 49, 52, 72, 104, 75, 92
With this information, calculate the endpoints of the central 90% confidence interval.
Information given:
To summarize the above, the values of import are:
Summary statistics from the problem
\( s^2 \)
| = |
271.668449 |
\( n \)
| = |
34 |
\( \alpha \)
| = |
0.1 |
It may be helpful if you calculate these values yourself. Once you have, you can check your answers by hovering your mouse over the grey spaces to see if you calculated them correctly.
Your Answer
You got the correct endpoints to the 90% confidence interval: (176.7382, 429.6381). Congratulations!
Unfortunately, your answer was not correct. Either try again or click on “Show Solution” below to see how to obtain the correct answer.
Assistance
Hide Solution
$$ \begin{align}
\text{Lower Limit} &= \left( n-1 \right) s^2 / \chi^2_L \\[1em]
&= \left( 34-1 \right) 271.668449 / 50.72508 \\[1em]
&= 176.73819 \\
\end{align}
$$
$$ \begin{align}
\text{Upper Limit} &= \left( n-1 \right) s^2 / \chi^2_U \\[1em]
&= \left( 34-1 \right) 271.668449 / 20.866534 \\[1em]
&= 429.638139 \\[3em]
\end{align}
$$
Thus, we are 90% confident that the population variance is between 176.7382 and 429.6381.
Hide the R Code
Copy and paste the following code into your R script window, then run it from there.
thisData = c(101, 54, 77, 88, 85, 65, 57, 101, 74, 89, 74, 65, 91, 62, 83, 70, 49, 63, 40, 86, 91, 76, 70, 96, 82, 86, 89, 86, 49, 52, 72, 104, 75, 92)
n = length(thisData)
s2 = var(thisData)
X2L = qchisq(0.05, df=33, lower.tail=FALSE)
X2U = qchisq(0.95, df=33, lower.tail=FALSE)
lcl = (n-1)*s2/X2L
ucl = (n-1)*s2/X2U
lcl; ucl
In the R output, the confidence limits are the numbers output following the final line. Note that R will give you confidence intervals that are more accurate and more precise than doing the calculations by hand. As such, these computer-calculated limits will differ slightly from those you calculate by hand.
Hide the Excel Code
Copy and paste the following code into your Excel window, making sure the value sample
ends up in A1
after pasting.
How to calculate the test statistic in Excel.
sample | | | |
101 |
|
alpha: |
0.1 |
54 |
|
var: |
=VAR(A:A) |
77 |
|
n: |
=COUNT(A:A) |
88 |
|
|
|
85 |
|
lcl: |
=(D4-1)*D3/CHISQ.INV(1-D2/2,D4-1) |
65 |
|
ucl: |
=(D4-1)*D3/CHISQ.INV(D2/2,D4-1) |
57 |
|
|
|
101 |
|
|
|
74 |
|
|
|
89 |
|
|
|
74 |
|
|
|
65 |
|
|
|
91 |
|
|
|
62 |
|
|
|
83 |
|
|
|
70 |
|
|
|
49 |
|
|
|
63 |
|
|
|
40 |
|
|
|
86 |
|
|
|
91 |
|
|
|
76 |
|
|
|
70 |
|
|
|
96 |
|
|
|
82 |
|
|
|
86 |
|
|
|
89 |
|
|
|
86 |
|
|
|
49 |
|
|
|
52 |
|
|
|
72 |
|
|
|
104 |
|
|
|
75 |
|
|
|
92 |
|
|
|
The endpoints of the 90% confidence interval are the numbers calculated in cells D6 and D7. Again, when you paste this code into Excel, make sure that you start the pasting in cell A1. To help with that, you may want to also copy this notice. It seems to help.