C
Chhaapptteerr 55::
C
CO
OM
MP
PA
AR
RIIN
NG
G TTW
WO
OM
ME
EA
AN
NS
SU
US
SIIN
NG
G TTH
HE
E TT--TTE
ES
STT
CHAPTER OVERVIEW
Chapter 1: Introduction
Chapter 2: Descriptive Statistics
Chapter 3: The Normal Distribution
Chapter 4: Hypothesis Testing
Chapter 5: T-test
Chapter 6: Oneway Analysis of Variance
Chapter 7: Correlation
Chapter 8: Chi-Square
This chapter introduces you to the t-test which is statistical tool used to test the significant
differences between the means of two groups. The independent t-test is used when the
means of two groups when the sample is drawn from two different or independent
samples. The dependent or pairwise t-test is used when the sample is tested twice the
means are compared.
2
Chapter 5: Comparing two means using the t-test
What is the T-Test?
3
Chapter 5: Comparing two means using the t-test
The Hypothesis Tested Using the T-Test
How do we go about establishing whether the differences in the two means are
statistically significant or due to chance? You begin by formulating a hypothesis
about the difference. This hypothesis states that the two means are equal or the
difference between the two means is zero and is called the null hypothesis.
Using the null hypothesis, you begin testing the significance by saying:
"There is no difference in the score obtained in science between subjects in the
Discovery group and the Lecture group".
More commonly the null hypothesis may be stated as follows:
a) Ho : U1 = U2
b) Ho : U1 U2
= 0
43.0 = 38.0
43.0 38.0 = 0
If you reject the null hypothesis, it means that the difference between the two
means have statistical significance
If you do not reject the null hypothesis, it means that the difference between
the two means are NOT statistically significant and the difference is due to
chance.
Note:
For a null hypothesis to be accepted, the difference between the two means need not
be equal to zero since sampling may account for the departure from zero. Thus, you
can accept the null hypothesis even if the difference between the two means is not
zero provided the difference is likely to be due to chance. However, if the difference
between the two means appears too large to have been brought about by chance, you
reject the null hypothesis and conclude that a real difference exists.
LEARNING ACTIVITY
a) State TWO null hypothesis in your area of interest
that can be tested using the t-test.
b) What do you mean when you reject or do not reject
the null hypothesis?
4
Chapter 5: Comparing two means using the t-test
The t-test is a powerful statistic that enables you to determine that the
differences obtained between two groups is statistically significant. When two groups
are INDEPENDENT of each other; it means that the sample drawn came from two
populations. Other words used to mean that the two groups are independent are
"unpaired" groups and "unpooled groups.
Sample of 35 MALES
Sample of 35 FEMALES
Research Question:
"Is there a significant difference in spatial reasoning between male and female ten
year old children?"
Null Hypothesis or Ho:
"There is no significant difference in spatial reasoning between male and female
ten year old children"
5
Chapter 5: Comparing two means using the t-test
Combine
the
two
formulas and you get
this version of the t-test
formula:
6
Chapter 5: Comparing two means using the t-test
b) Example:
The results of the study are as follow:
12 -10
4.0 1
(35-1)
2
4.0 2
-------------
0.1177 + 0.1177
(35-1)
4.124
0.485
Note:
The t-value will be positive if the mean for Group I is larger or more than (>) the
mean of Group 2 and negative if it is smaller or less than (<).
Alpha Level: As with any test of significance, you need to set the alpha level.
In most educational and social research, the "rule of thumb" is to set the alpha
level at .05. This means that 5% of the time (five times out of a hundred) you
would find a statistically significant difference between the means even if
there is none ("chance").
Degrees of Freedom: The t-test also requires that we determine the degrees of
freedom (df) for the test. In the t-test, the degrees of freedom is the sum of the
subjects or persons in both groups minus 2. Given the alpha level, the df, and
the t-value, you look up in the Table (available as an appendix in the back of
7
Chapter 5: Comparing two means using the t-test
d) Look up in the Table of Critical Values for Student's t-test shown on the right:
The df is 70 minus 2 = 68. You take the nearest df which is 70 and read the
column for the two-tailed alpha of 0.050. See Table 5.1.
The t-value you obtained is 4.124. The critical value shown is 1.677. Since,
the t-values is greater than the critical value of 1.677, you Reject Ho and conclude
that the difference between the means for the two groups is different. In other words,
males scored significantly higher than females on the spatial reasoning test.
However, you do not have to go through this tedious process, as statistical
computer programs such as SPSS, provides the significance test results, saving you
from looking them up in the Table of Critical Values.
0.250
0.100
0.050
0.025
0.010
0.005
One
0.500
0.200
0.100
0.050
0.020
0.010
df
30
0.683
1.310
1.697
2.042
2.457
2.750
40
0.681
1.303
1.684
2.021
2.423
2.704
50
0.679
1.299
1.676
2.009
2.403
2.678
60
0.679
1.296
1.671
2.000
2.390
2.660
70
0.678
1.294
1.667
1.994
2.381
2.648
80
0.678
1.292
1.664
1.990
2.374
2.639
90
0.677
1.291
1.662
1.987
2.368
2.632
100
0.677
1.290
1.660
1.984
2.364
2.626
100
0.674
1.282
1.645
1.960
2.326
2.576
8
Chapter 5: Comparing two means using the t-test
LEARNING ACTIVITY
a) Would you reject Ho if you had set the alpha at 0.01 for a
two-tailed test?
b) When do you use the one-tailed test and two-tailed t-test?
While the t-test has been described as a robust statistical tool, it is based on a
model that makes several assumptions about the data that must be met prior to
analysis. Unfortunately, students conducting research tend not to report whether their
data meet the assumptions of the t-test. These assumptions need are be observed,
because the accuracy of your interpretation of the data depends on whether
assumptions are violated. The following are three main assumptions that are generic
to all t-tests.
Random Sampling
The sample of subjects should be randomly sampled from the population
of interest.
Normality
The data come from a distribution that has one of those nice bell-shaped
curves known as a normal distribution. Refer to Chapter 3: The Normal
Distribution which provides both graphical and statistical methods for
assessing normality of a sample or samples.
Sample Size
Fortunately, it has been shown that if the sample size is reasonably large,
quite severe departures from normality do not seem to affect the
9
Chapter 5: Comparing two means using the t-test
Homogeneity of Variance.
It has often been suggested by some researchers that homogeneity of
variance or equality of variance is actually more important than the
assumption of normality. In other words, are the standard deviations of the
two groups pretty close to equal? Most statistical software packages
provide a "test of equality of variances" along with the results of the t-test
and the most common being Levene's test of homogeneity of variance
(see Table 5.2).
Levene's Test
of Equality
of Variances
Equal
Variances
Assumed
Unequal
Variances
Assumed
95% Confidence
Interval
Sig
Sign.
Two-tail
Mean
Std. Error Upper
Difference Difference
Lower
3.39
.080
.848
20
.047
1.00
1.18
-1.46
3.46
.848
16.70
.049
1.00
1.18
-1.49
3.40
10
Chapter 5: Comparing two means using the t-test
If the Levene statistic is significant, i.e. LESS than .05 level (p < .05), then the null
hypothesis is:
REJECTED and one accepts the alternative hypothesis and conclude that
the VARIANCES ARE UNEQUAL. [The unequal variances in the SPSS
output is used]
If the Levene statistic is not significant, i.e. MORE than .05 level (p > .05),
then you DO NOT REJECT (or Accept) the null hypothesis and conclude
that the VARIANCES ARE EQUAL. [The equal variances in the SPSS
output is used]
The Levene test is robust in the face of departures from normality. The Levene's test
is based on deviations from the group mean.
The Levene test is more robust in the face of non-normality than more
traditional tests like Bartlett's test.
LEARNING ACTIVITY
Refer to the table above. Based on the Levenes Test of
Homogeneity of variance, what is your conclusion. Explain.
To establish the statistical significance of the means of these two groups, the ttest was used. Using SPSS.
11
Chapter 5: Comparing two means using the t-test
4.
SPSS OUTPUTS:
Output #1:
The Group statistics table above reports that the mean values on the variable
(inductive reasoning) for the two different groups (males and females). Here, we see
that the 495 females in the sample scored 8.99 while the 451 males had a mean score
of 7.95 on inductive reasoning. The standard deviation for the males is 3.46 while
that for the females is 3.14. The scores for the females are less dispersed compared to
the males.
12
Chapter 5: Comparing two means using the t-test
GROUP STATISTICS
INDUCTIVE
GENDER
Male
Female
Mean
451
495
7.9512
8.9980
2.345
3.879
First is to determine that the data meet the "Homogeneity of Variance" assumption
you can use the Levene's Test and set the alpha at 0.05. The alpha obtained is 0.054
which is greater (>) than 0.05 and you do not Reject the Ho: and conclude that the
variances are equal. Hence, you have not violated the "Homogeneity of Variance"
assumption.
Levene's Test
of Equality
of Variances
F
Equal
Variances
Assumed
Unequal
Variances
Assumed
Sig
4.720 .030
95% Confidence
Interval
Sign.
Two-tail
-4.875
944
-4.853 911.4
Mean
Std. Error Upper
Difference Difference
Lower
.000
-1.0468
-2.147
-1.4682
-.6254
.049
-1.0468
-2.146
-1.4701
-.6234
13
Chapter 5: Comparing two means using the t-test
The SPSS output below displays the results of the t-test to test whether or not
the difference between the two sample means is significantly different from
zero.
Remember the null hypothesis states that there is no real difference between
the means (Ho: X1 = X2).
Interpretation:
t-value
This "t" value tells you how far away from 0, in terms of the number of standard
errors, the observed difference between the two sample means falls. The "t" value is
obtained by dividing the difference in the Means ( - 1.0468) by the Std. Error (-.2147)
which is equal to - 4.875
p-value
If the p-value as shown in the "sig (2 tailed) column is smaller than your chosen alpha
level you do not reject the null hypothesis and argue that there is a real difference
between the populations. In other words, we can conclude, that the observed
difference between the samples is statistically significant.
Mean Difference
This is the difference between the means (labelled "Mean Difference"); i.e. 7.9512
8.9980 = 1.0468.
14
Chapter 5: Comparing two means using the t-test
Null Hypotheses:
There is no significant difference between the pretest and the posttest scores in
mathematics for subjects taught using visualisation techniques.
PRETEST
POSTTEST
15
Chapter 5: Comparing two means using the t-test
d
t =
sd
Science
Pretest
Science
Posttest
1
2
3
4
5
6
7
8
9
10
12
10
15
9
11
13
14
11
10
9
18
14
19
15
14
17
16
13
16
12
d = 38
d = 162
Paired
difference
d
6
4
4
6
3
4
2
2
4
3
d = 38
d
36
16
16
36
9
16
4
4
16
9
d = 162
The 4th column in the table above shows the difference, d, between the science pretest
and the science posttest scores for each of the 10 students sampled. You refer to each
16
Chapter 5: Comparing two means using the t-test
If the null hypothesis is true, the paired differences between the pretest and
the posttest for the 10 students sampled should average about 0 (zero).
If the paired differences is greater than zero, the null hypothesis is false.
38
number of students
= 3.80
10
Step 2:
Next is to compute the value of sd.
sd =
(d) n
162
n1
=
n1
1.399
Step 3:
Applying the t-test for Dependent Means formula:
d
t =
3.80
=
sd
(38) n
=
1.399
10
8.589
17
Chapter 5: Comparing two means using the t-test
Tailed
Two 0.100
One 0.200
0.050
0.100
0.025
0.050
0.010
0.020
0.005
0.010
df
9
1.383
1.833
2.262
2.821
3.250
10
1.372
1.812
2.228
2.764
3.169
11
1.363
1.796
2.201
2.718
3.106
12
1.356
1.782
2.179
2.681
3.055
Step 4:
Having computed the t-value (which is 8.589) you look up the t-value in The Table
of Critical Values for Student's t-test or The Table of Significance which tells us
whether the ratio is large enough to say that the difference between the groups is
significant. In other words the difference observed is not likely due to chance or
sampling error.
Alpha Level:
The researcher set the alpha level at 0.05. This means that 5% of the time (five out of
a hundred) you would find a statistically significant difference between the means
even if there is none ("chance").
Degrees of Freedom:
The t-test also requires that we determine the degrees of freedom (df) for the test. In
the t-test, the degrees of freedom is the sum of the subjects or persons which is 10
minus 1 = 9. Given the alpha level, the df, and the t-value, you look up in the Table
(available as an appendix in the back of most statistics texts) to determine whether the
t-value is large enough to be significant.
Step 5:
The t-value obtained is 8.589 which is greater than the critical value shown which is
1.833 (one tailed). Hence, the null hypothesis [Ho:] is Rejected and Ha: is accepted
18
Chapter 5: Comparing two means using the t-test
which states Mean 1 > than Mean 2. It can be concluded that the difference between
the means is different. In other words, there is overwhelming evidence that a "gain"
has taken place on the science posttest as a result of training students on memory
techniques.
Again, you do not have to go through this tedious process, as statistical
computer programs such as SPSS, provides the significance test
results, saving you from looking them up in a table.
EXAMPLE:
In a study, a researcher was keen to determine if teaching note-taking techniques
improved achievement in history. A sample of 22 students selected for the study and
taught note-taking techniques for a period of 4 weeks. The research questions put
forward is:
"Is there a significant difference in performance in history before and after the
treatment?" i.e. You wish to determine whether the difference between the means
for the two sets of score is the same or different.
To establish the statistical significance of the means obtained on the pretest
and posttest, the dependent-samples or paired t-test was used.
19
Chapter 5: Comparing two means using the t-test
Data was collected from the same group of subjects on both conditions and
each subject obtains a score on the pretest, and after the treatment (or intervention or
manipulation), a score on the posttest.
Ho: U1 = U2
or Ha: U1 = U2
4.
You will notice that the syntax for the Independent Groups t-test is different from that
of the Dependent groups t-test. In the case of the Independent Groups t-test you have
a grouping variable so you can distinguish between Group 1 and Group 2 whereas
this is not found with the Dependent groups t -test.
N
40
40
The Paired sample statistics table above reports that the mean values on the variable
(history test) for the pretest and posttest. The posttest mean is higher (63.98) than the
posttest mean (43.15) indicating improved performance in the history test after the
20
Chapter 5: Comparing two means using the t-test
treatment. The standard deviation for the pretest 2.05 and is very close to the standard
deviation for the posttest which is 2.08.
The question remains: Is this mean difference large enough to convince us that there
it is a real significant difference in performance in history a consequence of teaching
note taking techniques)?
Paired Differences
Mean
Std .
Std. Error
Difference Deviation
Mean
Pair Pretest
Posttest
-20.83
15.65
2.47
t
Lower
-25.83
df
Sig. (2 tailed)
Upper
-15.82 -8.43
39
.000
t-Value
This "t" value tells you how far away from 0, in terms of the number of standard
errors, the observed difference between the two sample means falls. The "t" value is
obtained by dividing the Mean difference ( - 20.83) by the Std. Error (2.47) which is
equal to 8.43.
p-value
The p-value shown in the "sig (2 tailed) column is smaller than your chosen alpha
level (0.05) and so you Reject the null hypothesis and argue that there is a real
difference between the pretest and posttest.
In other words, we can conclude, that the observed
means is statistically significant.
Mean Difference
This is the difference between the means 43.15 63.98 = 20.83 which students did
significantly better on the posttest.
21
Chapter 5: Comparing two means using the t-test
LEARNING ACTIVITY
t-Test for Dependent Means or Groups
T-test
Page 3 of 5
CASE STUDY 1:
In a study, a researcher was interested in finding out
whether attitude towards science would be enhanced when
students are taught science using the Inquiry Method. A
sample of 22 students were administered an attitude toward
science scale before the experiment. The treatment was
conducted for one semester and after which the same
attitude scale was administered to the same group of
students.
ATTITUDE
Pair
N
Pretest
Posttest
22
22
Mean
8.50
13.86
.71
.59
Paired Differences
Mean
Std .
Deviation
2.90
Std. Error
Mean
Lower
.62
-6.65
df
Upper
-4.08
-8.66
21
Sig.
(2 tailed)
.000
22
Chapter 5: Comparing two means using the t-test
23
Chapter 5: Comparing two means using the t-test
LEARNING ACTIVITY
t-Test for Independent Means or Groups
T-test
CASE STUDY 2:
A researcher was interested in finding out about the
creative thinking skills of secondary school students. He
administered a 10 item creative thinking to a sample of
4400 sixteen year old students drawn from all over
Malaysia
e 3 of 5
GENDER
N
Std. Deviation
Male
1966
6.9410
2.2858
5.155E-02
Female
2438
6.8351
2.4862
5.035E-02
Levene's Test
for Equality
of Variances
Equal
Equal
Mean
t-test for
Equality of
Means
Sig.
19.408
.000
1.456
1.469
df
4402
4327
Sig.
2-tailed
Mean
Difference
.145
.142
.1059
.1059
Std. Error
Difference
7.271E-02
7.206E-02
24
Chapter 5: Comparing two means using the t-test
SUMMARY
The t-test is a powerful statistic that enables you to determine that the
differences obtained between two groups is statistically significant.
When two groups are INDEPENDENT of each other; it means that the sample
drawn came from two populations. Other words used to mean that the two
groups are independent are "unpaired" groups and "unpooled groups..
In most educational and social research, the "rule of thumb" is to set the alpha
level at .05. This means that 5% of the time (five times out of a hundred) you
would find a statistically significant difference between the means even if
there is none ("chance").
25
Chapter 5: Comparing two means using the t-test
This "t" value tells you how far away from 0, in terms of the number of
standard errors, the observed difference between the two sample means falls.
The Dependent means t-test or the Paired t-test or the Repeated measures t-test
is used when you have data from only one group of subjects. i.e. each subject
obtains two scores under different conditions.
KEY WORDS:
T-test
Independent groups
Dependent groups
Paired groups
t-value
Levenes test
Critical values
Alpha level
Degress of freedom
One tailed
Two tailed
Null hypothesis
Alternative hypothesis