Page 105 - 4660
P. 105
Student’s t-test
It is worth noting the connection between the t-test and the classical confidence interval on the
mean µ. The central confidence interval on µ at the confidence level 1 − α, is the set of values for
which
¯ x − µ
−t crit < √ < t crit ,
s/ N − 1
where t crit satisfies C N−1 (t crit ) = α/2. Thus the required confidence interval is
t crit s t crit s
¯ x − √ < µ < ¯x + √ .
N − 1 N − 1
Hence, in the above example, the 90% classical central confidence interval on µ is 0.49 < µ < 1.73.
The t-distribution may also be used to compare different samples from Gaussian distributions.
In particular, let us consider the case where we have two independent samples of sizes N 1 and
2
N 2 , drawn respectively from Gaussian distributions with a common variance σ but with possibly
different means µ 1 and µ 2 . One the basis of the samples, one wishes to distinguish between the
2
2
hypotheses H 0 : µ 1 = µ 2 , 0 < σ < ∞ and H 1 : µ 1 ̸= µ 2 , 0 < σ < ∞. 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 are ¯x 1 , ¯x 2 and s 1 , s 2
respectively. In an analogous way to that presented above, one may show that the generalised
likelihood ratio can be written as
( 2 ) −(N 1 +N 2 )/2
t
λ = 1 +
N 1 + N 2 − 2
In this case, the variable t is given by
( ) 1/2
¯ w − ω N 1 N 2
t = , (3.11)
ˆ σ N 1 + N 2
where ¯w = ¯x 1 − ¯x 2 , ω = µ 1 − µ 2 and
[ 2 2 ] 1/2
N 1 s + N 2 s
ˆ σ = 1 2 .
N 1 + N 2 − 2
It is straightforward (albeit with complicated algebra) to show that the variable t in (3.11) follows
Student’s t-distribution with N 1 + N 2 − 2 degrees of freedom, and so we may use an appropriate
formofStudent’st-testtoinvestigatethenullhypothesisH 0 :µ 1 = µ 2 (orequivalentlyH 0 :ω = 0).
As above, the t-test can be used to place a confidence interval on ω = µ 1 − µ 2 .
Example 3.3. Suppose that two classes of students take the same mathematics
examination and the following percentage marks are obtained:
Class 1: 66 62 34 55 77 80 55 60 69 47 50
Class 2: 64 90 76 56 81 72 70
Assuming that the two sets of examinations marks are drawn from Gaussian
distributions with a common variance, test the hypothesis H 0 : µ 1 = µ 2 at the 5%
significance level. Use your result to obtain the 95% classical central
confidence interval on ω = µ 1 − µ 2 . ,
Solution. We begin by calculating the mean and standard deviation of each sample. The
number of values in each sample is N 1 = 11 and N 2 = 7 respectively, and we find ¯x 1 = 59.5,
s 1 = 12.8 and ¯x 2 = 72.7, s 2 = 10.3, leading to ¯w = ¯x 1 − ¯x 2 = −13.2 and ˆσ = 12.6. Setting ω = 0
in (3.11), we thus find t = −2.17.
105