Lecture 6 T-test part B
Lecture 6 T-test part B
f = n-1 = 12-1 = 11
x = 0.65
s2 = 1.568 g2
1.568
sx 0.36
12
t = 1.81
Since the tabulated value is larger than the calculated one, we do not reject the Ho.
x x2
t
S x1 x2
Where:
x1 x2 = Difference between the two means.
85
4. The observations are paired.
When testing two samples from two populations, we have to know whether the two
populations have equal variances or not, before testing.
For two samples, the variances of the samples are calculated and then compared. The
outcome of the variance test is the one that determines whether we use the test procedure
for equal or unequal variances.
H 0 : S12 S22
H A : S12 S 22
= 0.05
S12 S22
F or F , the larger variance is always the numerator.
S22 S12
Working example
T1 41, 34, 33, 36, 40, 25, 31, 37, 34, 30, 38
T2 52, 57, 62, 55, 64, 57, 56, 55
n1= 11
d.f.1 = 10
S12 = 21.87
86
n=8
d.f.2 = 7
S22 = 15.36
S12 21.87
F 1.42
S22 15.36
Tabulated F0.05, 10,7 = 3.64, its value is greater than the calculated value of 1.42. We
therefore do not reject H0 and conclude that the two variances are not different.
If the two variances are not different, then they be pooled together in calculating t. A
variance common to the two samples is calculated and this is referred to as the pooled
variance. This is calculated as shown below:
2 S2P S2P 2 S 2P S P2
S x x2 + S x x2 +
n1 n2 n1 n2
87
x1 x2
t
S P2 S P2
n1 n2
Working example
Two samples with the following values:
A B
N 10 8
x 26.5 32.5
2
S 3.621 3.88
32.9 31.04
S p2 3.97
10 8 2
Sp 3.97 1.93
26.5 32.51
t 6.55
1.93 1.93
10 8
d.f = 10 + 18 2 = 9 + 7 = 16
W reject the H0, since the calculated value is larger than the tabulated value and conclude
the two sample means are different.
88
The t is calculated in the same way as previously, but instead of calculating a pooled
variance, the individual variances are used as shown below.
x x2 x1 x2
t
Se( x1 x1 ) S12 S22
n1 n2
The difference in the t-test calculation involves obtaining the degrees of freedom. Instead
of adding up the two degrees of freedom, we calculate the d.f as follows:
1
df 2
u (1 u ) 2
n1 1 n2 1
S12
n1
where u
S12 S22
n1 n2
The calculated d.f value is not always an integer but it has to be truncated and value to
the right of the decimal point discarded. If we obtained a d.f of 19.456, we use only the
integer part, 19 and discard the 0.456.
Summary Procedure
H A : x1 x1 , if (t ) t (2), df reject H 0
H A : x1 x1 , if (t ) t (1) df reject H 0
H A : x1 x1 , if (t ) t (1) df reject H 0
89
so if the sample sizes are equal or nearly equal; and where 2-tailed hypothesis are
considered.
With large the sample size, the t-test is more robust. The power of the test is little
affected by skewness. The power of the test is high when the sampled populations are
leptokurtic and the power is lower when the sampled populations are platykurtic (Figure
10.3 iii).
Figure 10.3: (i), Mesokurtic (normal) with few observations in the tail, (ii), leptokurtic,
where there are relatively more observations in the tails compared to (i) ,and (iii):
Platykurtic distribution with a high concentration of values in the middle and very
few in the tails.
90