Virtual Laboratories > Hypothesis Testing > 1 2 [3] 4 5 6 7

3. Tests of the Variance in the Normal Model


Preliminaries

Suppose that X1, X2, ..., Xn is a random sample from the normal distribution with mean µ and variance d2. In this section we will construct hypothesis tests for d. The key tools that we will need are the sample mean and the sample variance, and special properties of these statistics when the sampling distribution is normal. This section parallels the section on Estimation of the Variance in the Normal Model in the chapter on Interval Estimation.

The mean µ will play the role of a nuisance parameter, in the sense that the test procedure is different, depending on whether µ is known or unknown.

We will first assume that the mean µ is known, even though this is usually not a realistic assumption in applications. In this case, the parameter space is {d: d > 0} and all hypotheses about d define subsets of this space. A natural test statistic is

V0 = (1 / d02)sumi = 1, ..., n (Xi - µ)2.

Note that W2 = d02 V0 / n is the natural estimator of the variance when µ is known.

Mathematical Exercise 1. Show that if d0 = d, V0 has the chi-square distribution with n degrees of freedom

Consider now the more realistic case in which µ is also unknown. In this case, the underlying parameter space is {(µ, d): µ in R, d > 0}, and all hypotheses about d define subsets of this space. A natural test statistic is

V0 = (1 / d02)sumi = 1, ..., n (Xi - M)2.

where M = (1 / n)sumi = 1, ..., n Xi is the sample mean. Note that S2 = d02 V0 / (n - 1) is the sample variance.

Mathematical Exercise 2. Show that if d0 = d, V0 has the chi-square distribution with n - 1 degrees of freedom.

Hypothesis Tests

Hypothesis tests for d work the same way, whether µ is known or unknown; the only difference is the definition of the test statistic V0 and the number of degrees of freedom in the chi-square distribution. We will let vk, p denote the quantile of order p for the chi-square distribution with k degrees of freedom. If µ is known, we let k = n; if µ is unknown, we let k = n - 1. For selected values of k and p, vk, p can be obtained from the table of the chi-square distribution.

Mathematical Exercise 3. Show that for H0: d = d0 versus H1: d <> d0, the following test has significance level r:

Reject H0 if and only V0 > vk, 1 - r/2 or V0 < vk, r/2.

Mathematical Exercise 4. Show that for H0: d <= d0 versus H1: d > d0, the following test has significance level r:

Reject H0 if and only if V0 > vk, 1 - r.

Mathematical Exercise 5. Show that for H0: d >= d0 versus H1: d < d0, the following test has significance level r:

Reject H0 if and only if V0 < vk, r.

Mathematical Exercise 6. Show that for the tests in Exercises 3-5, we fail to reject H0 at significance level a if and only if the test variance d02 is in the corresponding 1 - r confidence interval.

Of course, the result in Exercise 6 is a special case of the general equivalence between hypothesis testing and interval estimation that was discussed in the introduction.

Power Curves

Recall that the power function for a test of d is Q(d) = P(Reject H0 | d). For the tests above, we can compute the power functions explicitly in terms of the distribution function Fk of the chi-square distribution with k degrees of freedom. Again, k = n if µ is known and k = n - 1 if µ is unknown.

Mathematical Exercise 7. For the test H0: d = d0 versus H1: d <> d0 at significance level r, show the following results and sketch the graph of Q:

  1. Q(d) = 1 - Fk[d02 vk, 1 - r/2 / d2] + Fk[d02 vk, r/2 / d2]
  2. Q(d) decreases for d < d0 and increases for d > d0.
  3. Q(d0) = r.
  4. Q(d) converges to 1 as d converges to 0+ and Q(d) converges to 1 as d converges to infinity.

Mathematical Exercise 8. For the test H0: d <= d0 versus H1: d > d0 at significance level r, show the following results and sketch the graph of Q:

  1. Q(d) = 1 - Fk[d02 vk, 1 - a / d2]
  2. Q(d) increases for d > 0.
  3. Q(d0) = a.
  4. Q(d) converges to 0 as d converges to 0+ and Q(d) converges to 1 as d converges to infinity.

Mathematical Exercise 9. For the test H0: d >= d0 versus H1: d < d0 at significance level r, show the following results and sketch the graph of Q:

  1. Q(d) = Fk[d02 vk, r / d2]
  2. Q(d) decreases for d > 0.
  3. Q(d0) = r.
  4. Q(d) converges to 1 as d converges to 0+ and Q(d) converges to 0 as d converges to infinity.

Mathematical Exercise 10. Show that in each case, the test of d when µ is known is more powerful than the test of d when µ is unknown.

Simulation Exercises

Simulation Exercise 11. In the variance test experiment, select the normal distribution with mean 0, the two-sided test at significance level 0.1, sample size n = 10, and test standard deviation 1.0.

  1. For each of the values of the true standard deviation 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, run the experiment 1000 times, updating every 10 runs, and note the relative frequency of rejecting H0.
  2. When the true standard deviation is 1.0, compare the relative frequency of rejecting H0 with the significance level.
  3. Using the relative frequencies in (a), plot the empirical power curve.

Simulation Exercise 12. In the variance test experiment, repeat Exercise 11 with the left tailed test.

Simulation Exercise 13. In the variance test experiment, repeat Exercise 11 with the right tailed test.

Simulation Exercise 14. In the variance estimate experiment, select the normal distribution with µ = 0 and standard deviation 2, the two-sided interval at confidence level 0.90, and sample size n = 10. Run the experiment 20 times, updating after each run. State the corresponding hypotheses and significance level, and for each run, give the set of test standard deviations for which the null hypothesis would be rejected.

Simulation Exercise 15. In the variance estimate experiment, repeat Exercise 14 with the confidence lower bound.

Simulation Exercise 16. In the variance estimate experiment, repeat Exercise 14 with the confidence upper bound.

Non-Normal Distributions

Even when the underlying distribution is not normal, the procedure of this section is still used to perform approximate tests for the variance. You will see in the simulation exercises below that this procedure is not nearly as robust as that of testing for the mean. Nonetheless, if the distribution is not too far from normal, the procedure usually works well.

Simulation Exercise 17. In the variance test experiment, select the gamma distribution with shape parameter 1 and scale parameter 1 (thus, the true standard deviation is 1). Select the two-sided test at significance level 0.1 and sample size n = 10.

  1. For each of the test standard deviations 0.7, 0.8, 0.9, 1.0, 1.1, 1.2, 1.3, run the simulation 1000 times, updating every 10 runs, and note the relative frequency of rejecting H0.
  2. When the test standard deviation is 1.0, compare the relative frequency in (a) with the significance level.

Simulation Exercise 18. In the variance test experiment. repeat Exercise 17 with sample size n = 20.

Simulation Exercise 19. In the variance test experiment, select the gamma distribution with shape parameter 4 and scale parameter 1 (thus, the true standard deviation is 2). Select the two-sided test at significance level 0.1 and sample size n = 10.

  1. For each of the test standard deviations 1.6, 1.8, 2.0, 2.2, 2.4, run the simulation 1000 times, updating every 10 runs, and note the relative frequency of rejecting H0.
  2. When the test standard deviation is 2.0, compare the relative frequency in (a) with the significance level.

Simulation Exercise 20. In the variance test experiment, select the uniform distribution on (0, 4) (thus, the true standard deviation is about 1.15). Select the two-sided test at significance level 0.1 and sample size n = 10.

  1. For each of the test standard deviations 0.69, 0.92, 1.15, 1.39, 1.62, run the simulation 1000 times, updating every 10 runs, and note the relative frequency of rejecting H0.
  2. When the test standard deviation is 1.15, compare the relative frequency in (a) with the significance level.

Data Analysis Exercises

Data Analysis Exercise 21. Using Michelson's data, test to see if the standard deviation of the velocity of light measurements is less than 80 km/sec, at the 0.1 significance level.

  1. Assume that µ is the "true value."
  2. Assume that the µ is unknown.

Data Analysis Exercise 22. Using Cavendish's data, test to see if the standard deviation of density measurements is greater than 0.2, at the 0.05 significance level.

  1. Assume that µ is the "true value."
  2. Assume that the µ is unknown.

Data Analysis Exercise 23. Using Short's data, test to see if the standard deviation of parallax measurements differs from 0.7 seconds of a degree, at the 0.1 significance level.

  1. Assume that µ is the "true value."
  2. Assume that the µ is unknown.

Data Analysis Exercise 24. Using Fisher's iris data, perform the following tests, at the 0.1 level:

  1. The standard deviation of the petal length of Setosa irises differs from 2 mm.
  2. The standard deviation of the petal length of Verginica irises is greater than 5 mm.
  3. The standard deviation of the petal length of Versicolor irises is less than 5.5 mm.