You are on page 1of 5

LECTURE 11

t – TEST FOR COMPARING ONE AND TWO SAMPLE MEANS

INTRODUCTION
t test is also called Student t-test. It was first introduced by Sir William Gosset. t-
test is based on t-distribution and is considered an appropriate test for judging the
significance of a sample mean or for judging the significance of difference between the
means of two samples in case of small sample(s) when population variance is not known.

Conditions
1. Sample size should be small (n<30).
2. Population variance (σ) is not known.
3. The parent population from which samples is drawn should be normal.
4. The sample observations are independent or randomly selected from the
population.

Types of t test
1. One sample t test
2. Two sample t test with equal variance
3. Two sample t test with unequal variance

1. One sample t test


The one sample t test is a statistical hypothesis test used to determine whether the
mean calculated from sample data is equal to a designated value specified by the
researcher.

Conditions
1. Sample size should be small (n<30).
2. Population mean (μ) is known.
3. Population variance (σ) is not known.

Procedure
Step 1: Formulation of the hypothesis
H 0 : X = P
(i.e.) There is no significance difference between the sample mean
and the population mean.
H 1 :  X   P ( X   P (or) X   P )
(i.e.) There is a significance difference between the sample mean
and the population mean.

Step 2: Level of Significance


The level may be fixed at either 5% or 1%.
22AG2056 Statistical Methods (1+1) | 89

Step 3: Test statistic


x −
t= t (n − 1,  )
s
n
n n

 xi  (x − x )
i
2

where, sample mean x = and sample standard deviation s = i =1


i =1
.
n n −1
Step 4: Find the table value of t corresponding to (n-1) df and the specified level of
significance.

Step 5: Inference
If tcal < ttable, then, non-significant for given α and accept H0. We conclude that there
is no significant difference sample mean and population mean.
Otherwise, if tcal < ttable, then, significant for given α and reject H0 i.e., we accept the
alternative hypothesis and conclude that there is significant difference between the sample
mean and the population mean.

Example 11.1
Based on field experiments, a new variety of green gram is expected to give a yield
of 12.0 quintals per hectare. The variety was tested on 10 randomly selected farmer’s fields.
The yield (quintals/hectare) were recorded as 14.3, 12.6, 13.7, 10.9, 13.7, 12.0, 11.4, 12.0,
12.6, 13.1. Do the results confirm to the expectation?
Solution:
Step 1:
H 0 :  = 12
(i.e) the average yield of the new variety of green gram is 12.0 quintals/hectare.
H 1 :   12
(i.e) the average yield of the new variety of green gram is not equal 12.0 quintals/hectare.
Step 2: Level of Significance
Level of significance is 5 % i.e., α=0.05
Step 3: Test statistic
xi xi − x ( xi − x ) 2 n

14.30 1.67 2.79


 xi
126.30
x= i =1
= = 12.63
12.60 -0.03 0.00 n 10
13.70 1.07 1.14 n
10.90 -1.73 2.99  ( xi − x )2
10.60
13.70 1.07 1.14 s = i =1 = =1.085
12.00 -0.63 0.40 n − 1 9
11.40 -1.23 1.51
12.00 -0.63 0.40 x −  12.63 − 12 12.63 − 12
t= = = = 1.836
12.60 -0.03 0.00 s 1.085 0.3432
13.10 0.47 0.22 n 10
126.30 0.00 10.60
22AG2056 Statistical Methods (1+1) | 90

Step 4: Table value for t corresponding to 5% level of significance and 9 df is 2.262 (two
tailed test)

Step 5: Inference
Since, tcal < ttable, we accept the null hypothesis H0. We conclude that the new variety
of green gram will give an average yield of 12 quintals/hectare.

2. Two sample t test (Independent Samples with equal variance)


A two-sample t-test is defined as statistical hypothesis testing technique in which
two independent samples are compared to determine if the means of two populations are
statistically different.

Conditions
1. Sample size should be small (n<30).
2. Two samples are independent.
3. Population variance is not known.
4. Variance of the two samples are equal.

Procedure
Step 1: Formulation of the hypothesis
H 0 : 1 = 2
(i.e.) There is no significance difference between the two sample means
H 1 : 1  2
(i.e.) There is a significance difference between the two sample means

Step 2: Level of Significance


The level may be fixed at either 5% or 1%.

Step 3: Test statistic


x1 − x2
t= ~ t distribution with ( n1 + n2 − 2) df with  LOS
1 1
sp +
n1 n2

where s 2
=
( n1 − 1) s12 + ( n2 − 1) s22
, s1 =
 (x
1i − x1 ) 2
, s2 =
 (x2i − x2 ) 2
p
( n1 − 1) + ( n2 − 1) n1 − 1 n2 − 1

Step 4: Find the table value of t corresponding to n1 + n2 − 2 df and the specified level of
significance.

Step 5: Inference
If tcal < ttable, then, non-significant for given α and accept H0. We conclude that there
is no significant difference sample mean and population mean.
22AG2056 Statistical Methods (1+1) | 91

Otherwise, if tcal < ttable, then, significant for given α and reject H0 i.e., we accept the
alternative hypothesis and conclude that there is significant difference between the sample
mean and the population mean.

Example 11.2: In a fertilizer trial, the grain yield of paddy (Kg/plot) was observed as
follows. Under ammonium chloride, the grain yield of paddy (Kg/plot) were 42, 39, 38,
60 and 41 kg. Under urea, the grain yield of paddy (Kg/plot) were 38, 42, 56, 64, 68, 69
and 62 kg. Find whether there is any difference between the sources of nitrogen?
Solution:

Step 1: Formulation of the hypothesis


H 0 : 1 = 2 (i.e) there is no significant difference in effect between the sources of nitrogen.
H 1 : 1  2 (i.e) there is a significant difference between the two sources

Step 2: Level of Significance


Level of significance is 5 % i.e., α=0.05

Step 3: Test statistic


x1 − x2
t= ~ t distribution with ( n1 + n2 − 2) df with  LOS
1 1
sp +
n1 n2
x1i x1i − x1 ( x1i − x1 ) 2 x2i x2i − x2 ( x2i − x2 ) 2
42 -2.00 4.00 38 -19.00 361.00
39 -5.00 25.00 42 -15.00 225.00
38 -6.00 36.00 56 -1.00 1.00
60 16.00 256.00 64 7.00 49.00
41 -3.00 9.00 68 11.00 121.00
69 12.00 144.00
62 5.00 25.00
220.00 0.00 330.00 399.00 0.00 926.00

x 1i
220
x1 = i =1
= = 44
n1 5
n

x 2i
399
x2 = i =1
= = 57
n2 7

s1 =
 (x 1i − x1 ) 2
=
330
n1 − 1 4
22AG2056 Statistical Methods (1+1) | 92

s2 =
 (x 2i − x2 ) 2
=
926
n2 − 1 6

s 2
=
( n1 − 1) s12 + ( n2 − 1) s22
=
330 + 926
= 125.6
p
( n1 − 1) + ( n2 − 1) 5+7−2
44 − 57
t= = 1.98
1 1
125.6  + 
5 7

Step 4: The degrees of freedom is 5+7-2= 10. For 5 % level of significance, table value of
t is 2.28.
Step 5: Inference
Since tcal < ttable, then, we accept the null hypothesis H0. We conclude that the two
sources of nitrogen do not differ significantly with regard to the grain yield of paddy.

***
EXERCISE: 11
1. One sample t test introduced by ........
2. In one sample t test with n observations, the degree of freedom is ......
3. ..................... t test is used to test the sample mean with the population mean.
4. Define two- sample test.
5. The degrees of freedom of two sample test is ..................
6. What are the conditions of one sample t test?
7. Write the step wise procedure for one sample t test.
8. What are the conditions of two sample t test with equal variance?
9. Write the step wise procedure for two sample t test with equal variance.
10. For a given sample of size 22, mean 83 and standard deviation 12.5, test that the
sample mean is equal to the population mean of 70 at 5% level of significance.
11. We have the potato yield from 12 different farms. We know that the standard
potato yield for the given variety is µ=20. x = [21.5, 24.5, 18.5, 17.2, 14.5, 23.2,
22.1, 20.5, 19.4, 18.1, 24.1, 18.5]. Test if the potato yield from these farms is
significantly different from the standard yield.
12. The following data relate the rubber yield of two types of rubber plants, where the
sample have been drawn independently. Test whether the two types of rubber
plants differ in their yield.
Type 1 3.2 5.7 6.0 4.4 5.2 4.4 4.8 5.8
Type 2 6.2 7.7 6.4 7.7 7.3 7.2 7.0

***

You might also like