31.7 HYPOTHESIS TESTING
distributions. In particular, let us consider the case where we have two independent
samples of sizesN 1 andN 2 , drawn respectively from Gaussian distributions with
a common varianceσ^2 but with possibly different meansμ 1 andμ 2. On the basis
of the samples, one wishes to distinguish between the hypotheses
H 0 :μ 1 =μ 2 , 0 <σ^2 <∞ and H 1 :μ 1 =μ 2 , 0 <σ^2 <∞.
In other words, we wish to test the null hypothesis that the samples are drawn
from populations having the same mean. Suppose that the measured sample
means and standard deviations arex ̄ 1 , ̄x 2 ands 1 ,s 2 respectively. In an analogous
way to that presented above, one may show that the generalised likelihood ratio
can be written as
λ=
(
1+
t^2
N 1 +N 2 − 2
)−(N 1 +N 2 )/ 2
.
In this case, the variabletis given by
t=
w ̄−ω
σˆ
(
N 1 N 2
N 1 +N 2
) 1 / 2
, (31.119)
where ̄w=x ̄ 1 − ̄x 2 ,ω=μ 1 −μ 2 and
σˆ=
[
N 1 s^21 +N 2 s^22
N 1 +N 2 − 2
] 1 / 2
.
It is straightforward (albeit with complicated algebra) to show that the variablet
in (31.119) follows Student’st-distribution withN 1 +N 2 −2 degrees of freedom,
and so we may use an appropriate form of Student’st-test to investigate the null
hypothesisH 0 :μ 1 =μ 2 (or equivalentlyH 0 :ω= 0). As above, thet-test can be
used to place a confidence interval onω=μ 1 −μ 2.
Suppose that two classes of students take the same mathematics examination and the
following percentage marks are obtained:
Class1:6662345577805560694750
Class2:64907656817270
Assuming that the two sets of examinations marksare drawn from Gaussian distributions
with a common variance, test the hypothesisH 0 :μ 1 =μ 2 at the5%significance level. Use
your result to obtain the95%classical central confidence interval onω=μ 1 −μ 2.
We begin by calculating the mean and standard deviation of each sample. The number of
values in each sample isN 1 =11andN 2 = 7 respectively, and we find
̄x 1 =59. 5 ,s 1 =12.8and ̄x 2 =72. 7 ,s 2 =10. 3 ,
leading tow ̄= ̄x 1 −x ̄ 2 =− 13 .2andσˆ=12.6. Settingω= 0 in (31.119), we thus find
t=− 2 .17.
The rejection region forH 0 is given by (31.114), wheretcritsatisfies
CN 1 +N 2 − 2 (tcrit)=1−α/ 2 , (31.120)