8.4Testing the Equality of Means of Two Normal Populations 315
0
Area = a
−ta,k
Area = a
ta,k
FIGURE 8.5 Density of a t-random variable with k degrees of freedom.
whereSp^2 , thepooledestimator of the common varianceσ^2 , is given by
Sp^2 =
(n−1)Sx^2 +(m−1)Sy^2
n+m− 2
Hence, whenH 0 is true, and soμx−μy=0, the statistic
T≡
X−Y
√
Sp^2 (1/n+1/m)
has at-distribution withn+m−2 degrees of freedom. From this, it follows that we can
test the hypothesis thatμx=μyas follows:
accept H 0 if |T|≤tα/2,n+m− 2
reject H 0 if |T|>tα/2,n+m− 2
wheretα/2,n+m− 2 is the 100α/2 percentile point of at-random variable withn+m− 2
degrees of freedom (see Figure 8.5).
Alternatively, the test can be run by determining thep-value. IfTis observed to equal
v, then the resultingp-value of the test ofH 0 againstH 1 is given by
p-value=P{|Tn+m− 2 |≥|v|}
= 2 P{Tn+m− 2 ≥|v|}
whereTn+m− 2 is at-random variable havingn+m−2 degrees of freedom.
If we are interested in testing the one-sided hypothesis
H 0 :μx≤μy versus H 1 :μx>μy
thenH 0 will be rejected at large values ofT. Thus the significance levelαtest is to
reject H 0 if T≥tα,n+m− 2
not reject H 0 otherwise