Virtual Laboratories > Hypothesis Testing > 1 2 [3] 4 5 6 7
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)i
= 1, ..., n (Xi - µ)2.
Note that W2 = d02 V0 / n is the natural estimator of the variance when µ is known.
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)i
= 1, ..., n (Xi - M)2.
where M = (1 / n)i
= 1, ..., n Xi is the sample mean. Note that S2 = d02
V0 / (n - 1) is the sample variance.
2. Show that if d0
= d, V0 has the chi-square distribution with n - 1
degrees of freedom.
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.
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.
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.
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.
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.
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.
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:
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:
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:
10. Show that in
each case, the test of d when µ is known is more powerful than the test of d
when µ is unknown.
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.
12.
In the
variance test experiment, repeat
Exercise 11 with the left tailed test.
13.
In the
variance test experiment, repeat
Exercise 11 with the right tailed test.
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.
15.
In the variance estimate experiment, repeat
Exercise 14 with the confidence lower bound.
16. In
the variance estimate experiment, repeat
Exercise 14 with the confidence upper bound.
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.
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.
18.
In the
variance test experiment. repeat
Exercise 17 with sample size n = 20.
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.
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.
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.
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.
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.
24.
Using Fisher's iris
data, perform the following tests, at
the 0.1 level: