Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

TESTING OF HYPOTHESIS t - TEST

t – Test for Difference between Two Means

Let x1, x2 ,… , xn be a sample of size n1 drawn form a population with mean


1
µ1 and variance σ 12
and y1 , y2 ,…, yn be another sample of size n2 drawn from another population with mean
2
µ2

and variance σ 2 . Also assume that the population variances σ 1 and σ 2 are not know an assumed
2 2 2

to be equal and sample sizes are considerable small. Under this situation, if the experimenter is
interested in testing the equality of the two population means, then the null hypothesis and
alternative hypothesis are given as

H 0 : µ1 = µ2 versus H1 : µ1 ≠ µ2 (for two-tail test)

or

H 0 : µ1 = µ2 versus H1 : µ1 < µ2 (for left-tail test)

or

H 0 : µ1 = µ2 versus H1 : µ1 > µ2 (for right-tail test)

If x and y are the means of the respective samples, then we have the t-statistic as

x− y x− y
t= or t =
1 1
+ 1 1
Sp S p2  + 
n1 n2  n1 n2 
n n2
1 1 1
where x = ∑ xi and y = ∑y j
n 1 i =1 n2 j =1

 2
1
( ) ( )
2
S p2 = ∑ xi − x + ∑ y j − y 
n1 + n2 − 2  i j 
OR
2 2

S =
2
p
1
 n1s12 + n2 s12  ;
n1 + n2 − 2 
2 1
s1 = ∑ xi − x
n1 i
( ) and s2 =21
n2
∑( y
j
j −y )
[ S 2 is an unbiased estimate of the population variance σ 2 ]
The test statistic follows Student’s t -distribution with ( n1 + n2 − 2 ) degrees of freedom.

PREPARED BY
V.KARTHICK M.Sc.,M.Phil., (MATHEMATICS) PAGE:
TESTING OF HYPOTHESIS t - TEST

NOTE: 1
If n1 = n2 = n ,and if the samples are independent i.e., the observations in the two samples are not

x1 − x2
at all related, then the test statistic is given by t = with υ = 2n − 2
s12 + s22
n −1

NOTE: 2

Where S p2 =
( n1 − 1) s12 + ( n2 − 1) s22 is used as a pooled sample variance. And hence the pooled
n1 + n2 − 2

standard deviation (known as standard error) is given as S p =


( n1 − 1) s12 + ( n2 − 1) s22
n1 + n2 − 2

Here the variable t follows t -distribution with υ = n1 + n2 − 2 degrees of freedom.

However, when the population variances are unknown and not equal, the t statistic is given as
x−y
t=
s12 s22
+
n1 n2

Note 3.

If the pairs of values are in some way associated (or correlated) we cannot adopt the case under
Note 1. Then we have to find the difference of the associated pairs of values and apply for single
mean.

PREPARED BY
V.KARTHICK M.Sc.,M.Phil., (MATHEMATICS) PAGE:
TESTING OF HYPOTHESIS t - TEST

PROBLEM:

Use the students t -test to test the equality of the means of two populations having the
same variance given the following two independent samples of size 11.
Sample 1: 57 120 101 119 117 104 73 53 63 118 70
Sample 2: 89 30 82 50 39 22 57 32 96 31 85

SOLUTION:
Step 1: Null hypothesis: H 0 : µ1 = µ 2 ⇒ H 0 : µ1 − µ 2 = 0

That is, we assume that there is no difference between the two population means.
This implies that the samples have come from the sample population.
Step 2: Alternative hypothesis: H1 : µ1 ≠ µ2
This means that the population means are significantly different.
This implies that the samples have come from two different populations.
It is a two-tail test.
Step 3: Level of significance: For 5% level of significance with degrees of freedom

υ = 2n − 2 = 2 (11) − 2 = 22 − 2 = 20 , we have from t -table

−tα 2,υ = −t0.05,20 = −2.086 and +tα 2,υ = −t0.05,20 = +2.086

x− y x− y x− y
Step 4: Under H 0 , the test statistic is t = or t = or t =
1 1 1 1 s12 + s22
Sp + S p2  + 
n1 n2  n1 n2  n −1

Where

n n
1 1 1 2  2
( )
x= ∑ x and y = ∑ y , 2
 ∑ x − x + ∑  y − y  
1
n i =1 i n j =1 j S2 =
p n +n −2 
j  
1 2 i j
1 2 i 
(OR)
2 2

S = 2 1
 n1s12 + n2 s12  ;
n1 + n2 − 2 
p
2 1
s1 = ∑ xi − x
n1 i
( ) and s2 =
2 1
n2
∑( y
j
j −y )

PREPARED BY
V.KARTHICK M.Sc.,M.Phil., (MATHEMATICS) PAGE:
TESTING OF HYPOTHESIS t - TEST

2
( xi − x )
Here n1 = n2 = n = 11 2  y − y
xi yj  j 
 
995 613 57 89 1119.21 1107.07
x= = 90.45 and y = = 55.73
11 11 120 30 872.93 661.89
101 82 111.21 690.26
s12 = 676.79 and s22 = 687.65 119 50 814.84 32.80
117 39 704.66 279.80
S 2 = 750.45 ⇒ S p = 27.39 104 22 183.48 1137.53
p
73 57 304.66 1.62
x− y x− y x− y 53 32 1402.84 562.98
t= or t = or t = = 2.97 63 96 753.75 1621.89
1 1 1 1 s12 + s22
Sp + S  + 
2
118 31 758.75 611.44
n1 n2 p
 n1 n2  n −1 70 85 418.39 856.89
995 613 7444.73 7564.18

Step 5: Conclusion:
Since the calculated t -value, i.e., t = 2.97 , is greater than the tabulated t value, i.e.,
−tα 2,υ = −t0.05,20 = −2.086 and +tα 2,υ = −t0.05,20 = +2.086 , we reject the null hypothesis

at 5% level of significance.
Hence, we conclude that there is a significant difference between the two population
mean, and hence we can treat these two populations are different.
Therefore, the two samples have come from the different populations.

PREPARED BY
V.KARTHICK M.Sc.,M.Phil., (MATHEMATICS) PAGE:

You might also like