Two independent samples t-test

Student's t-test for two independent samples

Comparison of two means from independent samples.


Requirements:

Dependent variable is at least interval scaled and normal distributed.


Hypothesis:

Nondirectional:

H0:nondirectional H0

H1:nondirectional H1

Directional (example):

H0:directional H0

H1:directional H1


If mean x1and mean x2are normal distributed random variables, their difference difference of mean x1 - x2is normal distributed, too. The decision between the two hypothesis is made according to the sample distribution of the mean differences.

The mean of this distribution is:

 population mean of difference of x1 and x2

And its standard deviation is:

 population standard deviation of difference of x1 and x2


If homogenity of variances is assumed homogeneous variancesit follows:

estimated population standard deviation of difference of x1 and x2                                      (1)


 if population varianceis unknown, it is estimated from the sample:

estimated population variance                             (2)


(2) inserted in equation (1):

 estimated population standard deviation of difference of x1 and x2


The following equation is t-distributed with df = degrees of freedom if   population standard deviation of the difference is estimated from the sample:

formula independent samples t test

 

According to H0: H0

formula independent samples t test

 

 

 If variances are inhomogeneous df is corrected as follows:

correction of degrees of freedom when variances are inhomogeneous

whereas

c

 


Example of a 2 independent samples t-test

Amy is a sleepresearcher and hypothesizes that people who sleep less than 6 hours will score significantly lower than people who sleep more than eight hours on a memory consolidation test. She brings 32 participiants into her sleep lab and randomly assigns them to one of two groups. In one group she has participants sleep for more than eight hours and in the other group she has them sleep for less than six hours. All participiants have to memorize 10 different short stories before going to sleep. The next morning Amy administers the AMCT (Amy's Memory Consolidation Test) to all participiants. (Scores on AMCT range from 1 to 20 with hight scores representing better performance):

 

< 6 hours 
x1 residual x1 squared residual x1
12 1 1
12 1 1
10 -1 1
15 4 16
9 -2  4
11 0 0
12 1 1
11 0 0
13 2 4
9 -2 4
-3 9
13 2 4
11 0 0
13 2 4
7 -4 16
10 -1 1
Σ

176

0

66

> 8 hours 
x2 residual x2 squared residual x2
12 -1 1
13 0 0
14 1  1
16 3  9
9 - 4 16
14  1  1
10 -3 9
16 3 9
15 2  4
14 1  1
13 0  0
10 -3  9
14  1 1
11 -2 4
12 -1 1
15 2 4
Σ

208

0

70

 


Amy's hypothese is directional, since she expects that people with less sleep than six hours will score lower than those people with more than eight hours of sleep. Hence she will test the following hypothesis:

H0 directional H1 directional


If she had hypothesized that the two groups do not perform equally, she would test the following non-directional hypothesis:

H0 non-directional H1 non-directional

 

 

mean x1            mean x2

 

 

n1 = n2 = 16

 

 

difference x1 - x2

 

 

estimated population variance of difference

 

 

estimated population variance of difference

 

 

estimated population variance of difference of means

 

 

t value

 

 

degrees of freedom

 

 

Testing Amy's directional hypothesis:

 

critical t value directional

 

For the directional hypothesis we find that the observed t-value is smaller than the critical t-value (5%, one-sided). People with less than six hours do perform worse in Amy's Memory Consolidation Test than those with more than eight hours of sleep.

 

 

Testing the non-directional hypothesis:

 

critical t value non-directional

 

For the non-directional hypothesis we find, too, that the observed t-value is smaller than the critical t-value (5%, two-sided). The two groups do differ in their performance in the AMCT.

 

 

BrightStat Output of Amy's Memory Consolidation t-test example

 

This is a fictitious example.


Second Example of a 2 independent samples t-test

A psychologist is interested in verbal learning skills of males and females. A test reveals the following results:

 

Men 
x1 residual x1 squared residual x1
102 2.5 6.25
97  -2.5 6.25
104 4.5 20.25
91 -8.5 72.25
104 4.5  20.25
108 8.5 72.25
93 -6.5 42.25
94 -5.5 30.25
101 1.5 2.25
100 0.5 0.25
89  -10.5 110.25
108 8.5 72.25
110 10.5 110.25
96 -3.5 12.25
99 -0.5 0.25
98 -1.5 2.25
101 1.5 2.25
88 -11.5 132.25
104 4.5  20.25
98 -1.5 2.25
107 7.5 56.25
102 2.5  6.25
104 4.5  20.25
90 -9.5 90.25
116 16.5 272.25
95 -4.5  20.25
99 -0.5 0.25
102 2.5  6.25
104 4.5  20.25
93 -6.5 42.25
100 0.5 0.25
87 -12.5 156.25
Σ

3184

0

1428.25

Women 
x2 residual x2 squared residual x2
99 -2 4
104 3  9
105 4  16
95 -6  36
98  -3  9
102  1  1
115  14 196
102  1  1
97  -4  16
91  -10  100
106  5  25
108  7  49
101  0 0
100 -1  1
96  -5  25
95  -6  36
93  -8  64
104  3  9
100  -1  1
107 6  36
109 8  64
109 8  64
95  -6  36
97  -4  16
102  1  1
99  -2  4
102  1  1
104  3  9
108  7  49
87  -14  196
Σ

3030

0

1074

 


mean x1            mean x2                 n1                  n2

difference x1 - x2


estimated population variance of difference

 

estimated population variance of difference

 

estimated population variance of difference of means

 

t value

 

degrees of freedom

 

critical t value

 

The observed t-value is greater than the critical t-value (5%, two-tailed). Verbal learning skills of males and females are not different.

 

BrightStat Output of 2 independent samples t-test example

 

This is a fictitious example.

How to do this example on BrightStat webapp


Wiki link t-test




 

Gallery

 
map kinase
 

PayPal Donation

IOTA Donate IOTA

IOTA Address:

CMGRJNJSFCUQYNO
JNYXXMYVLJDOLYA
MNZSMJUF99ENZND
VBUKSTMJQRREMXZ
IXKTLDGWQREWCBF
KKKJDYNLXTSYJYX