Tutorials › VEE Mathematical Statistics › Chi-Square Tests for a Normal Population Variance

VEE Mathematical Statistics · Classical Tests and Goodness of Fit · Tutorial 684 of 880

Chi-Square Tests for a Normal Population Variance

Use a normal-population model to calculate and interpret chi-square tests of a specified variance or standard deviation.

Intermediate 9 min read

What You'll Learn

  • State the normality and independence assumptions required for an exact variance test.
  • Convert a claim about standard deviation into a null hypothesis about variance.
  • Calculate the chi-square statistic from the sample variance and null variance.
  • Choose the correct tail or tails and degrees of freedom.
  • Use critical values and p-values to make a test decision.
  • Recognize why using the sample size instead of one fewer degree of freedom is incorrect.

Why Test a Population Variance?

A variance test asks whether the spread of a population is consistent with a specified value. For example, a hypothetical laboratory might need to assess whether a measuring process has become more variable than its established standard. A test of a population variance addresses that question directly; a test of the population mean does not.

The exact test developed here depends on a strong model: the observations must be an independent random sample from a normal population. Under that model, the sample variance has a known chi-square distribution after it is scaled by the hypothesized variance. This makes it possible to determine how unusual the observed spread would be if the null hypothesis were true.

Definition: Let \(X_1,\ldots,X_n\) be an independent random sample from a normal population with mean \(\mu\) and variance \(\sigma^2\). The sample mean is \(\bar{X}=\frac{1}{n}\sum_{i=1}^n X_i\), and the unbiased sample variance is $$ S^2=\frac{1}{n-1}\sum_{i=1}^n (X_i-\bar{X})^2. $$ When testing \(H_0:\sigma^2=\sigma_0^2\), the test statistic is \(Q=\frac{(n-1)S^2}{\sigma_0^2}\). Under \(H_0\), \(Q\) has a chi-square distribution with \(n-1\) degrees of freedom.

Hypotheses, Statistic, and Decision Rule

The alternative hypothesis determines which part of the chi-square distribution counts as evidence against the null. A claim about standard deviation is translated into a claim about variance by squaring the standard deviation. For example, \(H_0:\sigma=10\) is equivalent to \(H_0:\sigma^2=100\), because standard deviations are nonnegative.

QuestionNull and alternativeEvidence against \(H_0\)
Is the variance larger?\(H_0:\sigma^2=\sigma_0^2\), \(H_1:\sigma^2>\sigma_0^2\)A large value of \(Q\)
Is the variance smaller?\(H_0:\sigma^2=\sigma_0^2\), \(H_1:\sigma^2<\sigma_0^2\)A small value of \(Q\)
Is the variance different?\(H_0:\sigma^2=\sigma_0^2\), \(H_1:\sigma^2\ne\sigma_0^2\)A value of \(Q\) far into either tail

Write \(\chi^2_{\gamma,\nu}\) for the \(\gamma\)-quantile of a chi-square distribution with \(\nu\) degrees of freedom; thus \(P(\chi^2_\nu\leq\chi^2_{\gamma,\nu})=\gamma\). For a test with significance level \(\alpha\), the rejection regions are:

  • Upper-tailed: reject if \(Q>\chi^2_{1-\alpha,n-1}\).
  • Lower-tailed: reject if \(Q<\chi^2_{\alpha,n-1}\).
  • Two-tailed: reject if \(Q<\chi^2_{\alpha/2,n-1}\) or \(Q>\chi^2_{1-\alpha/2,n-1}\).

The two-tailed rule assigns half of the total significance level to each tail. This is the usual equal-tail chi-square test. Because the chi-square distribution is asymmetric, the two critical values are not equally far from its mean.

Why the Test Statistic Has a Chi-Square Distribution

The degrees of freedom are \(n-1\), not \(n\), because the deviations used in the sample variance are measured from the estimated sample mean. Estimating that mean imposes one constraint: the deviations sum to zero. The following standard decomposition explains the result under the normal model.

1
Standardize the observations.
Under \(H_0\), each \(Z_i=(X_i-\mu)/\sigma_0\) is standard normal. Therefore \(\sum_{i=1}^n Z_i^2\) has a chi-square distribution with \(n\) degrees of freedom.
2
Separate variation around the population and sample means.
The identity \(\sum_{i=1}^n (X_i-\mu)^2=\sum_{i=1}^n(X_i-\bar{X})^2+n(\bar{X}-\mu)^2\) separates the total squared deviation into a sample-variance part and a sample-mean part.
3
Use the normal-sample decomposition.
For an independent normal sample, the sample mean and sample variance are independent. The term \(n(\bar{X}-\mu)^2/\sigma_0^2\) has a chi-square distribution with one degree of freedom; subtracting that one degree of freedom leaves the sample-variance term with \(n-1\) degrees of freedom.

Since \(\sum_{i=1}^n(X_i-\bar{X})^2=(n-1)S^2\), the conclusion is

$$ \frac{(n-1)S^2}{\sigma_0^2}\sim\chi^2_{n-1}\qquad\text{when }H_0\text{ is true}. $$

This is an exact result when the observations are independent and normally distributed. Without the normal-population assumption, the statistic generally does not have this exact chi-square distribution. A large sample alone does not make this particular variance test automatically exact.

Worked Tests

Worked Example: Testing Whether Measurement Variability Increased

A hypothetical calibration process is modeled as producing independent measurements from a normal population. Its established standard deviation is 10 units. A random sample of 16 measurements has sample standard deviation 14 units. At significance level \(\alpha=0.05\), test whether the population variance has increased. Assume the stated model and sampling conditions hold.

Method and hypotheses. This is an upper-tailed chi-square test of variance. The null and alternative hypotheses are \(H_0:\sigma^2=10^2=100\) and \(H_1:\sigma^2>100\).

Calculate the sample variance and degrees of freedom. The observed sample variance is \(S^2=14^2=196\), and the degrees of freedom are \(n-1=16-1=15\).

Calculate the statistic.

$$ Q=\frac{(16-1)(196)}{100} =\frac{15(196)}{100} =\frac{2940}{100} =29.40. $$

For 15 degrees of freedom, the upper-tail 5% critical value is approximately \(\chi^2_{0.95,15}=24.996\). Since \(29.40>24.996\), reject \(H_0\) at the 5% level. The data provide evidence that the population variance exceeds 100 units squared, or equivalently that its standard deviation exceeds 10 units.

Check. The sample variance, 196, is larger than the null variance, and the statistic is in the upper rejection tail, as the direction of the alternative requires. The common mistake avoided is using a lower-tail rejection rule just because the null value is expressed as a variance.

Worked Example: Testing for a Smaller Variance

A hypothetical filling process is modeled as producing independent normal measurements. The target population standard deviation is 3 grams. A random sample of 10 fills has sample variance \(S^2=3\) grams squared. At \(\alpha=0.05\), test whether the population variance is smaller than the target variance. Assume the normal model and independence.

Method and hypotheses. The question calls for a lower-tailed test. The hypotheses are \(H_0:\sigma^2=3^2=9\) and \(H_1:\sigma^2<9\).

Calculate the statistic and degrees of freedom. Here \(n-1=9\), so

$$ Q=\frac{(10-1)(3)}{9} =\frac{27}{9} =3.00. $$

The lower 5% critical value for 9 degrees of freedom is approximately \(\chi^2_{0.05,9}=3.325\). Since \(3.00<3.325\), reject \(H_0\) at the 5% level. There is evidence that the population variance is below 9 grams squared, corresponding to a standard deviation below 3 grams.

Check. A sample variance below the null variance gives a statistic below \(n-1\), which is consistent with looking in the lower tail. The common mistake avoided is using the upper-tail critical value for every variance test.

Worked Example: Testing Whether Variability Changed in Either Direction

A hypothetical instrument is expected to produce independent observations from a normal population with standard deviation 5 units. A sample of 12 observations has sample variance \(S^2=50\) units squared. Test \(H_0:\sigma=5\) against \(H_1:\sigma\ne5\) at \(\alpha=0.05\). Assume the model conditions hold.

Translate the hypotheses. Since \(5^2=25\), these are equivalently \(H_0:\sigma^2=25\) and \(H_1:\sigma^2\ne25\).

Calculate the statistic. There are \(12-1=11\) degrees of freedom:

$$ Q=\frac{(12-1)(50)}{25} =\frac{550}{25} =22.00. $$

For a two-tailed test at \(\alpha=0.05\), use the 0.025 and 0.975 quantiles with 11 degrees of freedom. The critical values are approximately 3.816 and 21.920. Reject if \(Q<3.816\) or \(Q>21.920\). Since \(22.00>21.920\), reject \(H_0\). The sample provides evidence that the population variance differs from 25 units squared.

Check. The statistic is only slightly beyond the upper critical value, but it is beyond it, so the decision at the stated level is to reject. The common mistake avoided is comparing the statistic with the 5% upper-tail critical value instead of the 2.5% upper-tail critical value required for a two-tailed test.

Interpreting the Result and Avoiding Traps

A rejection means the observed sample variance would be sufficiently unusual under the specified normal model and null variance, according to the chosen significance level. It does not establish the size of the variance change, prove a practical consequence, or show that the model assumptions are true. A failure to reject means the sample did not provide enough evidence for the stated alternative; it does not prove the null hypothesis.

The p-value is the probability, assuming \(H_0\) and the model, of a statistic at least as extreme as the observed statistic in the direction or directions specified by \(H_1\). For an upper-tailed test it is \(P(\chi^2_{n-1}\geq Q_{\text{obs}})\); for a lower-tailed test it is \(P(\chi^2_{n-1}\leq Q_{\text{obs}})\). For a two-tailed equal-tail test, it is twice the smaller of the two tail probabilities, capped at 1. Reject at level \(\alpha\) when the p-value is at most \(\alpha\).

A frequent computational trap is to use \(n\) instead of \(n-1\) when forming the statistic. For the first worked example, the incorrect calculation would be \(16(196)/100=31.36\). The correct calculation is \(15(196)/100=29.40\), because the sample variance is defined using the divisor \(n-1\). The null distribution must also have \(n-1=15\) degrees of freedom. Mixing the \(n\)-based calculation with the \(n-1\) reference distribution gives an invalid test.

Key takeaway: For an independent normal sample, test a specified variance using \(Q=(n-1)S^2/\sigma_0^2\) and a chi-square distribution with \(n-1\) degrees of freedom. The alternative determines the tail, and a two-sided test splits \(\alpha\) across both tails.

Check Your Understanding

For each problem, use the stated normal model and independence assumption. Give the test decision at the specified significance level.

  1. A hypothetical sensor has a specified population variance of 16. An independent normal sample has \(n=14\) and \(S^2=25\). Test \(H_1:\sigma^2>16\) at \(\alpha=0.05\). (Answer: \(Q=13(25)/16=20.3125\), with 13 degrees of freedom; the upper 5% critical value is about 22.362, so do not reject.)
  2. A hypothetical blending process has specified variance 16. An independent normal sample has \(n=8\) and \(S^2=9\). Test \(H_1:\sigma^2<16\) at \(\alpha=0.10\). (Answer: \(Q=7(9)/16=3.9375\), with 7 degrees of freedom; the lower 10% critical value is about 2.833, so do not reject.)
  3. A hypothetical production measure is expected to have population standard deviation 5. An independent normal sample has \(n=20\) and \(S=6\). Test whether the standard deviation differs from 5 at \(\alpha=0.05\). (Answer: \(Q=19(36)/25=27.36\), with 19 degrees of freedom; the two-sided critical values are about 8.907 and 32.852, so do not reject.)
  4. A hypothetical normal process has specified population variance 16. An independent sample has \(n=25\) and \(S^2=30\). Test \(H_1:\sigma^2>16\) at \(\alpha=0.01\). (Answer: \(Q=24(30)/16=45.00\), with 24 degrees of freedom; the upper 1% critical value is about 42.980, so reject.)
Clinical Biostats