9. Hypothesis Testing

9.5 Chi Squared Test for Variance or Standard Deviation

The possible hypothesis pairs are, for variance :

Two-tailed Test Right-tailed Test Left-tailed Test
H_{0}:\sigma^{2}=k H_{0}:\sigma^{2}\leq k H_{0}:\sigma^{2}\geq k
H_{1}:\sigma^{2}\neq k H_{1}:\sigma^{2}>k H_{1}:\sigma^{2}<k

For standard deviation we use the square roots of everything :

Two-tailed Test Right-tailed Test Left-tailed Test
H_{0}:\sigma=k H_{0}:\sigma\leq k H_{0}:\sigma\geq k
H_{1}:\sigma\neq k H_{1}:\sigma>k H_{1}:\sigma<k

Note that we did not square root k. This is because we are using k to stand in for whatever number. That number from H_{0} will appear in our formulae as either \sigma^{2} or \sigma depending on the set up. Generally we will work with variance as we work through the problem and convert to standard deviation only in the last interpretation step if required by the wording of the question.

The new test statistic is :

    \[\chi^{2}_{\rm test} = \frac{(n-1)s^2}{\sigma^2}\]

where s comes from the sample and \sigma^{2} comes from the number k in H_{0}. The degrees of freedom associated with the test statistic (for finding the critical statistic) is \nu = n-1. There is no mystery where this test statistic came from — this is just how \chi^{2} as a probability distribution is defined. So, for this test to be valid, the population must be normally distributed. The \chi^{2} test here is not very robust to violations of that assumption because there is no normalizing intermediate central limit theorem here.

The critical regions on the \chi^{2} distribution will appear as shown in Figure 9.5.

Figure 9.5 : Schematics of the critical regions for \chi^{2} tests of variance. In the two-tailed situation the tail areas are equal.

Let’s work through an example of each hypotheses pair case. In all of the examples we assume that the population is normally distributed.

Example 9.6 : An instructor wishes to see whether the variance in scores of the 23 students in her class is less than the variance of the population. The variance of the class is 198. is there enough evidence to support the claim that the variation of the students is less than the population variance \sigma^2=225 at \alpha = 0.05?

Solution :

1. Hypotheses.

 

    \[ H_{0}: \sigma^2 \geq 225 \hspace{.25in} H_{1}: \sigma^{2} < 225 \]

2. Critical statistic.

Refer to Figure 9.6 as we get the critical statistic from the Chi-squared Distribution Table. As we see in that figure, we must look in the column that corresponds to a right tail area of 0.95. The row we need is for \nu = n-1=23-1=22. With that information we find \chi^2_{\rm crit} = 12.338.

Figure 9.6 : Schematics of the critical regions for \chi^{2} tests of variance. In the two-tailed situation the tail areas are equal.

3. Test statistic.

The values we need for the test statistic are \sigma^{2} = 225 (from H_{0}), s^{2} = 198 and n-1=22 from the information in the problem. So :

    \begin{eqnarray*} \chi^{2} & = & \frac{(n-1)s^{2}}{\sigma^{2}} \\ \chi^{2} & = & \frac{(22)(198)}{225} = 19.36 \end{eqnarray*}

At this point we can also estimate the p value from the Chi-squared Distribution Table. The p value is the area under the \chi^{2} distribution with \nu = 22 to the left of \chi^{2_{\rm test}}. In the \nu = 22 row of the Chi-squared Distribution Table (in general use the closest \nu if your particular value is not in the Chi-squared Distribution Table) hunt down the test statistic value of 19.38. You won’t find it but you can bracket it with values higher and lower than 19.38. Those numbers are 14.042 which has a right tail area of 0.90 (and so a left tail area of 0.10) and 30.813 which has a right tail area of 0.10 (and so a left tail area of 0.90). Recall that the \alpha in the column headings of the Chi-squared Distribution Table refers to right tail areas. So, considering the left tail areas we know that 0.10 < p < 0.90 since 30.813 > 19.38 > 14.042 for the relevant \chi^{2} values.

4. Decision.

Since \chi^{2}_{\rm test} doesn’t fall in the rejection region, do not reject H_{0}. We come to the same conclusion with our p-value estimate:

    \[ (0.10 < p < 0.90) > (\alpha = 0.05) \]

5. Interpretation.

There is not enough evidence, at \alpha = 0.05 with a \chi^{2} test, to support the claim that the variation in test scores of the class is less than 225.

Example 9.7 : A hospital administrator believes that the standard deviation of the number of people using out-patient surgery per day is greater than eight. A random sample of 15 days is selected. The data are shown below. At \alpha = 0.10 is there enough evidence to support the administrator’s claim?

    \begin{equation*} 25 \hspace{.2cm} 30 \hspace{.2cm} 5 \hspace{.2cm} 15 \hspace{.2cm} 18 \\ 42 \hspace{.2cm} 16 \hspace{.2cm} 9 \hspace{.2cm} 10 \hspace{.2cm} 12  \\ 12 \hspace{.2cm} 38 \hspace{.2cm} 8 \hspace{.2cm} 14 \hspace{.2cm} 27 \end{equation*}

Solution :

0. Data reduction.

We’ll introduce a step 0 when it looks like we should do some preliminary calculations with or data. In this case we should enter the dataset into our calculations and determine s. We find s=11.2.

1. Hypotheses.

    \[ H_0: \sigma^2 \leq 64 \hspace{.25in} H_1: \sigma^2 > 64 \mbox{ (claim)} \]

Note conversion to \sigma^2 right away.

2. Critical statistic.

In the \nu = 15-1=14 line and \alpha_{T}=0.10 column of the Chi-squared Distribution Table, look up \chi^2_{\rm crit} = 21.064

3. Test statistic.

    \begin{eqnarray*} \chi^{2}_{\rm test} & = & \frac{(n-1)s^2}{\sigma^2} \\ \chi^{2}_{\rm test} & = & \frac{(14)(11.2)^2}{64} = 27.44 \end{eqnarray*}

To estimate the p value, find the bracketing values of \chi^{2}_{\rm test} = 27.44 in the \nu = 14 line of the Chi-squared Distribution Table. They are : 26.119 (\alpha = 0.025) and 29.141 (\alpha = 0.010), so 0.010 < p < 0.025.

4. Decision.

Reject H_{0} since \chi^{2}_{\rm test} is in the rejection region. Our estimate of p leads to the same conclusion :

    \[ (0.010 < p < 0.025) < (\alpha = 0.10) \]

5. Interpretation.

There is enough evidence, at \alpha = 0.10 with a \chi^{2} test, to support the claim that the standard deviation is greater than 8. (Note how we convert to a statement about standard deviation after working through the problem using variances.)

Example 9.8 : A cigarette manufacturer wishes to test the claim that the variance of the nicotine content of its cigarettes is 0.644. Nicotine content is measured in milligrams, assume that it is normally distributed. A sample of 20 cigarettes has a standard deviation of 1.00 kg. At \alpha = 0.05, is there enough evidence to reject the manufacturer’s claim?

Solution :

1. Hypotheses.

    \[ H_{0}: \sigma^{2} = 0.644 \mbox{ (claim)} \hspace{.25in} H_{1}: \sigma^{2} \neq 0.64 \]

2. Critical statistic.

Figure 9.7 : Critical regions for a two tailed test.

Referring to Figure 9.7, we see that we need two \chi^2_{\rm crit} values, one with a tail area of 0.025 and the other with a tail area of 1 – 0.025 = 0.975. From the Chi-squared Distribution Table in the \nu = n - 1 = 19 line find \chi^2_{\rm crit} = 8.907 from the \alpha_{T} = 0.975 column and \chi^2_{\rm crit} = 32.852 from the \alpha_{T} = 0.025 column.

3. Test statistic.

    \begin{eqnarray*} \chi^{2}_{\rm test} & = & \frac{(n-1)s^{2}}{\sigma^{2}} \\ \chi^{2}_{\rm test} & = & \frac{(19)(1^{2})}{(0.644)} = 29.50 \end{eqnarray*}

To estimate the p value find the bracketing value of \chi^{2}_{\rm test} = 29.50 in the \nu = 19 row, They are 27.204 (\alpha_{T} = 0.10) and 30.144 (\alpha_{T} = 0.05). The \alpha_{T} are right tail areas, which is ok, but we need to multiply them by 2 because those right tail areas represent p/2 as shown in Figure 9.8. So 0.10 < p < 0.20.

Figure 9.8 : Areas for p associated with the test statistic (29.50 here) in a two tail test.

4. Decision.

Do not reject H_{0}. The estimate p value leads to the same conclusion :

    \[ (0.10 < p < 0.20) > (\alpha = 0.05) \]

5. Interpretation.

There is not enough evidence, at \alpha = 0.05 with a \chi^{2} test, to reject the manufacturer’s claim that the variance of the nicotine content of the cigarettes is equal to 0.644.

Notice, with the claim on H_{0}, that failing to reject H_{0} does not provide any evidence that H_{0} is true. We just have the weaker conclusion that we couldn’t disprove it. Such is the double negative nature of the logic behind hypothesis testing that arises where we don’t assign probabilities to hypothesis.

 

License

Share This Book