EXAMPLES OF HYPOTHESIS TESTS
In the preceding sections we have studied the theory of hypothesis testing. In this section we shall apply it to various practical problems.
EXAMPLE 9.6.1 (mean of binomial) It is expected that a particular coin is biased in such a way that a head is more probable than a tail. We toss this coin ten times and a head comes up eight times. Should we conclude that the coin is biased at the 5% significance level (more precisely, size)? What if the significance level is 10%?
From the wording of the question we know we must put (9.6.1) H0: p = У2 and Яр p > У2.
From Example 9.4.2, we know that we should use X ~ B(10,p), the number of heads in ten tosses, as the test statistic, and the critical region should be of the form
(9.6.2) R = {c, c + 1, . . . , 10},
where c (the critical value) should be chosen to satisfy
(9.6.3) P(X Є R I H0) = a,
where a is the prescribed size. In this kind of question there is no need to determine c by solving (9.6.3) for a given value of a. In fact, in this particular question there is no value of c which exactly satisfies (9.6.3) for either a = 0.05 or a = 0.1. Instead we should calculate the probability that we will obtain the values of X greater than or equal to the observed value under the null hypothesis, called the pvalue: that is,
(9.6.4) P(X = 8 or 9 or 10 I p = У2) = 45 (У2)10 + 10 (У2)10 + (У2)10
s 0.055.
From (9.6.4) we conclude that H0 should be accepted if a = 0.05 and rejected if a = 0.1.
We must determine whether to use a onetail test or a twotail test from the wording of the problem. This decision can sometimes be difficult. For example, what if the italicized phrase were removed from Example 9.6.1? Then the matter becomes somewhat ambiguous. If, instead of the italicized phrase, we were to add, “but the direction of bias is a priori unknown,” a twotail test would be indicated. Then we should calculate the Rvalue
(9.6.5) P(X = 8 or 9 or 10 or 0 or 1 or 2) = 0.11,
which would imply a different conclusion from the previous one.
Another caveat: Sometimes a problem may not specify the size. In such a case we must provide our own. It is perfectly appropriate, however, to say “H0 should be accepted if a < 0.055 and rejected if a > 0.055.” This is another reason why it is wise to calculate the Rvalue, rather than determining the critical region for a given size.
EXAMPLE 9.6.2 (mean of normal, variance known) Suppose the height
л a
of the Stanford male student is distributed as N(x, a ), where a is known
to be 0.16. We are to test H0: л = 5.8 against E/j: x = 6. If the sample average of 10 students yields 6, should we accept HQ at the 5% significance level? What if the significance level is 10%?
From Example 9.3.2, we know that the best test of a given size a should use X as the test statistic and its critical region should be given by
(9.6.6) X > c, where c is determined by P(X > c I H0) = a.
Since X ~ N(5.8, 0.016) under H0, we have
(9.6.7) P(X > 6) = P(Z > 1.58) = 0.0571,
where Z is N(0, 1). From (9.6.7) we conclude that H0 should be accepted if a is 5% and rejected if it is 10%. Note that, as before, determining the critical region by (9.6.6) and then checking if the observed value x falls into the region is equivalent to calculating the Rvalue P(X > x H0) and then checking if it is smaller than a.
EXAMPLE 9.6.В (mean of normal, variance unknown). Assume the
о
same model as in Example 9.6.2, except that now a is unknown and we have the unbiased estimator of variance cr = 0.16. We have under H0
<Ї0(X – 5.8)
(9.6.8) ;——— = <9, Student’s t with 9 degrees of freedom.
Therefore, by Example 9.5.2, the critical region should be chosen as <Ї0 (X – 5.8)
(9.6.9) ;——— > c, where c is determined by P (t9 > c) = a.
We have
Therefore we conclude that H0 should be accepted at the 5% significance level but rejected at 10%.
EXAMPLE 9.6.4 (difference of means of normal, variance known)
Suppose that in 1970 the average height of 25 Stanford male students was 6 feet with a standard deviation of 0.4 foot, while in 1990 the average
height of 30 students was 6.2 with a standard deviation of 0.3 foot. Should we conclude that the mean height of Stanford male students increased in this period? Assume that the sample standard deviation is equal to the population standard deviation.
Let Yt and X; be the height of the ith student in the 1970 sample and the 1990 sample, respectively. Define Y = (Ег2£1Уг)/25 andX = (Ef£1X,)/30. Assuming the normality and independence of X, and Yb we have
where p. x, Уу are the unknown means of X, and Yt, respectively. Our hypotheses can be expressed as
(9.6.12) H0: ibx ~ — 0 and Hy p. x – xy > 0.
We have chosen Нл as in (9.6.12) because it is believed that the height of young American males has been increasing during these years. Once we formulate the problem mathematically as (9.6.11) and (9.6.12), we realize that this example is actually of the same type as Example 9.6.2. Since we have under H0 (9.6.13) P(X – Y > 0.2) = P(Z > 2.063) = 0.02, we conclude that H0 should be accepted if a < 0.02 and rejected if a >
0.02.
EXAMPLE 9.6.5 (differences of means of binomial) In a poll 51 of 300 men favored a certain proposition, and 46 of 200 women favored it. Is there a real difference of opinion between men and women on this proposition?
Define Yi = 1 if the ith man favors the proposition and = 0 otherwise. Similarly define X, = 1 if the ith woman favors the proposition and = 0 otherwise. Define py = P(F, = 1) and px = P(X; = 1). If we define Y = (£300 у.)/Зое an(j X = (Е2£°! Хг)/200, we have asymptotically
where we have assumed the independence of X and Y. The competing hypotheses are
(9.6.15) H0: px py = 0 and H. px — py Ф 0.
Therefore this example essentially belongs to the same category as Example 9.6.4. The only difference is that in the present example the variance of the test statistic X — Y under H0 should be estimated in a special way. One way is to estimate px by 46/200 and py by 51/300. But since px = py under Hq, we can get a better estimate of the common value by pooling the two samples to obtain (46 + 51)/(200 + 300). Using the latter method, we have under H0
(9.6.16) X – Y~N(0, 0.0013).
Since we have under H0
EXAMPLE 9.6.6 (difference of means of normal, variance unknown)
This example is the same as Example 9.6.4 except that now we shall not assume that the sample standard deviation is equal to the population standard deviation. However, we shall assume crx = oy.
By Theorem 6 of the Appendix we have under H0
Inserting nx = 30, nY — 25, X = 6.2, Y = 6, Sx = 0.3, and Sy = 0.4 into
(9.6.18) above, we calculate the observed value of the Student’s t variable to be 2.077. We have
(9.6.19) P(t53 > 2.077) = 0.021.
Therefore we conclude that H0 should be accepted if a < 0.021 and
rejected if a > 0.021. In this particular example the use of the Student’s t statistic has not changed the result of Example 9.6.4 very much.
EXAMPLE 9.6.7 (difference of variances) In using the Student’s t test
2 2
in Example 9.6.6, we need to assume gx = • Therefore, it is wise to test
this hypothesis. By Theorem 3 of the Appendix, we have
(9.6.20) 
пх$х 
2 
2 Ox 
Xnx~l 

and 

(9.6.21) 
flySy 
2 
Gy 
Хпу—1 * 
null hypothesis cr = cry, 
Applying Definition 3 of the Appendix and (9:6.21), we have, under the
Inserting the same numerical values as in Example 9.6.6 into the lefthand side of (9.6.22) yields the value 0.559. But we have
(9.6.23) P[F(29, 24) < 0.559] = 0.068.
Since a twotail test is appropriate here (that is, the alternative hypothesis
2 2
is <yx Ф ay), we conclude that Fl0 should be accepted if a < 0.136 and rejected if a > 0.136.
Leave a reply