Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 13

The t Test

Chapter 11
Procedure
A t TEST is a procedure used for comparing sample means to see if there is sufficient
evidence to infer that the means of the corresponding population distributions also
differ. More specifically, for an independent-samples t test, a sample is taken from
two populations. The two samples are measured on some variable of interest. A t test
will determine if the means of the two sample distributions differ significantly from
each other. t tests may be used to explore issues such as: Does treatment A yield a
higher rate of recovery than treatment B? Does one advertising technique produce
higher sales than another technique? Do men or women score higher on a measure of
empathy? Does one training method produce faster times on the track than another
training method? The key word is two: t tests always compare two different means or
values.
In its chapter on t tests, the IBM SPSS Statistics Guide to Data Analysis spends
several pages talking about null hypotheses, populations, random samples, normal
distributions, and a variety of research concerns. All its comments are germane and
of considerable importance for conducting meaningful research. However, discussion
of these issues goes beyond the scope of this book. The topic of this chapter is t tests:
what they do, how to access them in SPSS, and how to interpret the results. There are
three kinds of t tests: Independent samples (comparing the means of two different
groups), dependent samples (comparing the means of two conditions where the same
people—or people whose scores are correlated with each other—are in both groups),
and one sample (comparing the mean of a sample with a pre-specified mean).

11.1 Independent-Samples t Tests


The first type of t test, the independent-samples t test, compares the means of two
different samples. The two samples share some variable of interest in common, but
there is no overlap between membership of the two groups. Examples include the
difference between males and females on an exam score, the difference on number of
pull-ups by Americans and Europeans, the difference on achievement test scores for a
sample of low-SES first graders and a sample of high-SES first graders, or the
difference of life-satisfaction scores between those who are married and those who
are unmarried. Note again that there is no overlap of membership between the two
groups. This procedure is described on page 151.

11.2 Paired-Samples t Tests


The second type of t test, the paired-samples t test, is usually based on groups of
individuals who experience both conditions of the variables of interest. Examples include
students’ scores on the first quiz versus the same students’ scores on the second quiz;
subjects’ depression scores after treatment A as compared to the same subjects’ scores
after treatment B; a set of students’ scores on the SAT compared to the same students’
scores on the GRE several years later; elementary school students’ achievement test
percentiles after one year at a low-SES school as compared to their achievement test
percentiles after one year at a high-SES school. Note here that the same group experiences
both levels of the variable. This procedure is described on page 152.
149

11.3 One-Sample t Tests


The third type of test is a one-sample t test. It is designed to test whether the mean of a distribution differs significantly
from some preset value. An example: Does a course offered to college seniors result in a GRE score greater than or equal
to 1200? Did the performance of a particular class differ significantly from the professor’s goal of an 82% average?
During the previous season, the mean time for the cross country athletes’ best seasonal performances was 18 minutes.
The coach set a goal of 17 minutes for the current season. Did the athletes’ times differ significantly from the 17-minute
goal set by the coach? In this procedure, described on page 153, the sample mean is compared to a single fixed value.

11.4 Significance and Effect Size


There are three questions that every researcher needs to ask about the difference between groups (or conditions, or the
sample and population means). The first question is, “Can I be certain that the difference between groups (or between
conditions, or between the sample mean and population mean) is not due to random chance?” The significance value ( p
value) answers this question. But in the case of a t test, you need to know whether to use a one-tailed or a two-tailed test
of significance. The two-tailed test examines whether the mean of one distribution differs significantly from the mean of
the other distribution, regardless of the direction (positive or negative) of the difference. The one-tailed test measures
only whether the second distribution differs in a particular direction from the first. For instance, at a weight-loss clinic,
the concern is only about the amount of weight loss. Any amount of weight gain is of no interest.
Likewise, an advertising campaign concerns itself only with sales increases.
Usually the context of the research will make clear which type of test is appropriate. The only computational
difference between the two is that the p-value of one is twice as much as the p-value of the other. If SPSS output
produces a two-tailed significance value (this is the default), simply divide that number by two to give you the probability
for a one-tailed test.
The second question that you need to ask about the difference tested with the t statistic is, “How big is the
difference?” For a t test, the usual measure of effect size is the Cohen’s d statistic, which is a measure of how many
standard deviations apart the means are. SPSS does not calculate the d, but it is easy to calculate:

MeanGroup1 MeanGroup 2
d
Standard Deviation

Note that, depending on which version of the t test you do, you may need to calculate the overall standard deviation of
the two groups or conditions in your data.
The third question that you need to ask about the difference tested is, “Is this difference important?” For that, you
need to look at the p value (if it’s not significant, we can’t be certain that it’s real, much less important), the d effect size
(bigger is more likely to be important), and you need to think about whether you think it’s important or not. Is d = .3 (of
a standard deviation) important? If that represents how much better treatment A improves hypertension than treatment
B, for sure!
For demonstration of these commands we once more make use of the grades.sav file with N = 105. Variables of
interest for this chapter include gender, total (total points in the class), year (first, second, third or fourth year in
college), the quizzes quiz1 to quiz5, and percent (the final class percent).
11.5 Step by Step
To access the initial SPSS screen from the Windows display, perform the following sequence of steps:

In Screen Do This Step 1

2.1
Front1

Mac users: To access the initial SPSS screen, successively click the following icons:

In Screen Do This Step 1a

2.1
Front1

After clicking the SPSS program icon, Screen 1 appears on the monitor.
Step 2

Create and name a data file or edit (if necessary) an already existing file (see Chapter 3)

Screens 1 and 2 (displayed on the inside front cover) allow you to access the data file used in
conducting the analysis of interest. The following sequence accesses the grades.sav file for
further analyses:
In Screen Do This Step 3

Whether first entering SPSS or returning from earlier operations the standard menu
of commands across the top is required. As long as it is visible you may perform any
analyses. It is not necessary for the data window to be visible.

11.5.1 Independent-Samples t Tests


From any screen that shows the menu of commands, select the following three options:
In Screen Do This Step 4

Front1 File Open Data [or]

Front2 type grades.sav Open [orgrades.sav


] Data

Menu Analyze Compare Means Independent-Samples T Test 11.1


At this point a new window opens (Screen 11.1, on the following page) that allows you
to conduct an independent-samples t test. Note the structure of this screen. To the left
is the list of variables; to the right is a box to indicate the Test Variable(s). Test
variables are the continuous variables (such as total points, final grade, etc.) for which
we wish to make comparisons between two independent groups. A single variable or
any number of variables may be included in this box. Below is the Grouping
Variable box where the single variable that identifies the two groups will be indicated.
This variable is usually discrete, that is, there are exactly two levels of the variable
(such as gender or a pass/fail grade). It is possible, however, to use a variable with
more than two levels (such as ethnicity—five levels, or grade—five levels) by indicating
how you wish to divide the variable into exactly two groups. For instance, for grade,
you might compare As and Bs (as one group) with Cs, Ds, and Fs (as the other group).
A continuous

Screen 11.1 The Independent-Samples t Test Window

variable could even be included here if you indicate the number at which to divide subjects into exactly
two groups.
Once you have identified the grouping variable, you next click on the Define Groups button. Even
for a variable that has exactly two levels, it is necessary to identify the two levels of the grouping variable.
At this point a new window opens (Screen 11.2, below) that, next to Group 1, allows you to designate the
single number that identifies the first level of the variable (e.g., female = 1) and then, next to Group 2,
the second level of the variable (e.g., male = 2). The Cut point option allows you to select a single
dividing point for a variable that has more than two levels.
Screen 11.2 The Define Groups Window

To test whether there is a difference between males and females on total points earned:
This Step 5

otal upper gender lower Define Groups

ss TAB type 1 press TAB type 2 Continue

OK Back1
The year variable has four levels and the use of the Cut point option is necessary to divide this
variable into exactly two groups. The number selected (3 in this case) divides the group into the
selected value and larger (3 and 4) for the first group, and all values smaller than the selected
value (1 and 2) for the second group. The starting point for this procedure is Screen 11.1. Do
whichever of Steps 1–4 (page 151) are necessary to arrive at this screen.
In Screen Do This Step 5a

11.1 total upper year lower Define Groups

11.2

Cut point pres TAB type


s

3 Continue
11.1 OK Back1

11.5.2 Paired-Samples t Tests


From any screen that shows the menu of commands, select the following three options:
Step 4a
In Screen Do This
Menu A 11.3
n alyze Compare MeansPaired-Samples T Test

The procedure for paired-samples t tests is actually simpler than the procedure for
independent samples. Only one window is involved and you do not need to designate
levels of a particular variable. Upon clicking the Paired-Samples T Test option, a
new screen appears (Screen 11.3, below). To the left is the now familiar list of variable
names, and, since you will be comparing all subjects on two different variables (quiz1
and quiz2 in the first example) you need to designate both variables before clicking
the in the middle of the screen. You may select as many pairs of variables as you
would like to paste into the Paired Variables box before conducting the analysis.
There are, however, no automatic functions or click and drag options if you wish to
conduct many comparisons. You must paste them, a pair at a time, into the Paired
Variables box.

Screen 11.3 The Paired-Samples t Test Window

To compare the distribution of scores on quiz1 with scores on quiz2, the following sequence of steps is required.
en Do This Step 5b

11.3 quiz1 hold down Ctrl key and quiz2 OK


Back1

If you wish to compute several t tests in the same setting, you will paste all desired pairs of
variables into the Paired Variables box. In the sequence that follows, the scores on quiz1
are compared with the scores on each of the other four quizzes (quiz2 to quiz5). Screen 11.3 is
the starting point for this sequence. Perform whichever of Steps 1–4 (page 151) to arrive at
this screen. A click of Reset may be necessary to clear former variables.

en Do This Step 5c
quiz1 hold down Ctrl key and quiz2

quiz1 hold down Ctrl key and quiz3

quiz1 hold down Ctrl key and quiz4

quiz1 hold down Ctrl key and quiz5 OK Back1

11.5.3 One-Sample t Tests


From any screen that shows the menu of commands, select the following three options.
en Do This Step 4b

u Analyze Compare Means One-Sample T Test 11.4


It is often desirable to compare the mean of a distribution with some objective standard. With the
grades.sav file, the instructor may have taught the class a number of times and has determined what
he feels is an acceptable mean value for a successful class. If the desired value for final percent is 85,
he may wish to compare the present class against that standard. Does this class differ significantly from
what he considers to be an acceptable class performance?

Screen 11.4 The One-Sample t Test Window

Upon clicking the One-Sample T Test option, the screen that allows onesample tests to be
conducted appears (Screen 11.4, previous page). This simple procedure requires pasting variable(s) from
the list of variables on the left into the Test Variable(s) box, typing the desired value into the box next
to the Test Value label and then clicking the OK. For each variable selected this procedure will compare
it to the designated value. Be sure that if you select several variables you want to compare them all to the
same number. Otherwise, conduct separate

analyses.

To determine if the percent values for the entire class differed significantly from 85, conduct the following
sequence of steps.
In Screen Do This Step 5d

11.4 percent press TAB type 85 OK Back1

Upon completion of Step 5, 5a, 5b, 5c, or 5d, the output screen will appear (Screen 1, inside back
cover). All results from the just-completed analysis are included in the Output Navigator. Make use of the
scroll bar arrows ( ) to view the results. Even when viewing output, the standard menu of
commands is still listed across the top of the window. Further analyses may be conducted without
returning to the data screen.

11.6 Printing Results


Results of the analysis (or analyses) that have just been conducted require a window that displays the
standard commands (File Edit Data Transform Analyze . . .) across the top. A typical print
procedure is shown below beginning with the standard output screen (Screen 1, inside back cover).

To print results, from the Output screen perform the following sequence of steps:
In Do This Step 6
Screen
Back Select desired output or edit (see pages 16–22) File Print
1 Consider and select desired print options offered, then
OK
2.9
To exit you may begin from any screen that shows the File command at the top.
In Screen Do This Step 7

Menu File Exit 2.1

Note: After clicking Exit, there will frequently be small windows that appear asking if you wish to save or
change anything. Simply click each appropriate response.

11.7 Output
In this section we present the three types of t tests separately, each under its own heading. A brief
description of findings follows each output section; definition of terms (for all three sections) finishes the
chapter. Output format for all three sets of results is slightly different (more space conserving) from that
provided by SPSS.
11.7.1 Independent-Samples t Test:
What follows is complete output from sequence Step 5 on page 152.
Dependent Std.
Variable Gender N Mean Deviation S.E. of Mean
total Female 64 102.03 13.896 1.737
Male 41 98.29 17.196 2.686

Independent-Samples t test
Levene’s
Test for
Equality of
95% Confidence
Variances
Sig. (2- Mean St. Error Interval of the
F Sig.
Variances t-Values df tailed) Difference Difference Difference
Equal 1.224 103 .224 3.739 3.053 −2.317 9.794
2.019 .158
Unequal 1.169 72.421 .246 3.739 3.198 −2.637 10.114

This independent-samples t-test analysis indicates that the females (n = 64) did not have a
significantly diferent total score (M = 102.03) than males (n = 41; M = 98.29), t(103) = 1.22, p = .22).
Levene’s test for Equality of Variances indicates variances for males and females do not differ
significantly from each other (p = .158). This result allows you to use the slightly more powerful equal-
variance t test. If Levene’s test did show significant differences, then it would be necessary to use the
unequal variance test. Definitions of other terms are listed on page 157.

11.7.2 Paired-Samples t Test:


Below is partial output (only the first comparison is included) from sequence Step 5b on page 154.
Paired-Samples Statistics
Variables N Correlation 2-tailed sig. Mean Std. Deviation S.E. of Mean
quiz1 7.47 2.481 .242
105 .673 .000
quiz2 7.98 1.623 .158

Paired-Samples Test
Paired Differences

Mean Std. Deviation S.E. of Mean 95% Conf. Interval t-value df 2-tailed sig.
−.514 1.835 .179 −.869 −.159 −2.872 104 .005
This paired-samples t test analysis indicates that for the 105 subjects, the mean score on the second
quiz (M = 7.98) was significantly greater at the p < .01 level (note: p = .005) than the mean score on the
first quiz (M = 7.47). These results also indicate that a significant correlation exists between these two
variables (r = .673, p < .001); those who score high on one of the quizzes tend to score high on the other.

11.7.3 One-Sample t Test:


What follows is complete output from sequence Step 5d on page 155.
One-Sample Statistics
Variable N Mean Std. Deviation Std. Error of Mean
Percent 105 80.381 12.1767 1.1883
One-Sample Test
Test Value = 85

t Df Sig. (2-tailed) Mean difference 95% Confidence


Interval
Percent −3.887 104 .000 −4.6190 −6.976 −2.263
This one-sample t test analysis indicates that the mean percent for this class (N =
105, M = 80.38) was significantly lower at the p < .001 level than the instructor’s
goal (Test Value) of 85%. The Mean Difference is simply the observed mean (80.38)
minus the Test Value (85.0).

11.7.4 Definitions of Terms


Term Definition/Description

Std. Error The standard deviation divided by the square root of


N. This is a measure of stability or
sampling error of the sample means.
F Value This value is used to determine if the
variances of the two distributions differ
significantly from each other. This is called
a test of heteroschedasticity, a wonderfulword
with which to impress your friends.
P= (for Levene’s test) If variances do not differ significantly,
then the equal-variance estimate may be used
instead of the unequal-variance estimate. The p
value here, .158, indicates that the two variances do
not differ significantly; so the statistically
more powerful equal-variance estimate may be used.
t Values Based on either the equal-variance estimate equation or
the unequal-variance estimate equation. Conceptually, both
formulas compare the within-group deviationsfrom the
mean with the between-group deviationsfrom the
mean. The slightly larger (absolute values) equal-variance
estimate may be used here because variances do
not differ significantly. The actual t value
is the difference between means divided by the
standard error. When reporting, include the degrees of
freedom (below) in parentheses after the letter
t.
df (degrees of freedom) For the equal-variance estimate,
number of subjects minus number of groups (105 −
2 = 103). The fractional degrees of freedom
(72.42) for the unequal-variance estimate is a
formula-derived value. For the paired-samples and
one-sample tests, the value is number of
subjects minus 1 (105 − 1 = 104).
Sig. (2-Tailed) (associated with the t values) The probability
that the difference in means could happen by
chance.
Mean Difference The difference between the two means.
Std. Deviation This is the standard deviation of the difference,
and it is used to calculate the t
value for the paired t test. For each
subject in a paired t test, there is
a difference between the two quizzes (sometimes
0, of course). This particular statistic is the
standard deviation of this distribution of mean-
difference scores.
Correlation Measures to what extent one variable varies systematically
with another variable. The statistic presented here is the
Pearson product-moment correlation, designated with an
r. See Chapter 10 for a description of
correlations.
2-Tailed Sig. (of The probability that such a pattern could happen
the correlation) by chance. In the paired-samples test, the
r = .67 and p < .001
indicate a substantial and significant correlation
between quiz1 and quiz2.
95% CI (Confidence With t tests, the confidence interval deals with
Interval) the difference-between-means value. If a large
number of samples were drawn from a
population, 95% of the mean differences
will fall between the lower and upper values
indicated.

Exercises
Exercises
On MyPoliSciLab
Answers to selected exercises are downloadable at www.spss-step-by-step.net
For questions 1–7, perform the following stress-reducing techniques. Their scores were
operations: 4, 4, 6, 0, 6, 5, 2, 3, 6, and 4. Do the
appropriate t test to determine if the group
a) Print out results.
that had been trained had different mental
b) Circle the two mean values that are being performance scores than the group that had
compared. not been trained in stress reduction
techniques. What do these results mean?
c) Circle the appropriate significance value (be
Report your results using APA style.
sure to consider equal or unequal variance).
9. In a similar experiment, 10 participants who
d) For statistically significant results (p < .05) were given a test of mental performance in
write up each finding in standard APA stressful situations at the start of the study
format. were then trained in stress reduction
techniques and were finally given the same
1. Using the grades.sav file, compare men with test again at the end of the study. In an
women (gender) for quiz1, quiz2, quiz3, amazing coincidence, the participants
quiz4, quiz5, final, and total. received the same scores as the participants
2. Using the grades.sav file, determine in question 8: The first two people in the
whether the following pairings produce study received a score of 2 on the pretest and
significant differences: quiz1 with quiz2, a score of 4 on the posttest; the third person
quiz1 with quiz3, quiz1 with quiz4, and received a score of 4 on the pretest and 6 on
quiz1 with quiz5. the posttest; and so on. Do the appropriate t
test to determine if there was a significant
3. Using the grades.sav file, compare the GPA difference between the pretest and posttest
variable (gpa) with the mean GPA of the scores. What do these results mean? How was
university of 2.89. this similar and how was this different than
4. Using the divorce.sav file, compare men the results in question 1? Why?
with women (sex) for age, school, 10. You happen to know that the population
cogcope, behcope, avoicop, iq, close, mean for the test of mental performance in
locus, socsupp, asq, spiritua, trauma, stressful situations is exactly three. Do a t test
and lsatisfy. to determine whether the posttest scores in
5. Using the helping3.sav file, compare men question 9 above (the same numbers as the
with women (gender) for age, school, training group scores in question 8) is
income, hclose, hcontrot, sympathi, significantly different than three. What do
angert, hcopet, hseveret, empathyt, these results mean? How was this similar and
effict, thelplnz, tqualitz, and tothelp. See how was this different than the results in
the Data Files section (page 368) for question 9? Why?
meaning of each variable. 11. You are studying whether high- and low-
6. Using the helping3.sav file, determine gestaltists differ in number of hours of sleep
whether the following pairings produce per night; you think that high-gestaltists get
significant differences: sympathi with more sleep than low-gestaltists. In your data,
angert, sympathi with empathyt, high gestaltists slept for the following number
empahelp with insthelp, empahelp with of hours: 6, 7.3, 7, 6.9, 4.6, 4.8, 6.9, 9.9, 7.1,
infhelp, and insthelp with infhelp. and 6.9. Low gestaltists slept for the
7. Using the helping3.sav file, compare the following number of hours: 5.1, 5.9, 6, 5.5,
age variable (age) with the mean age for 3.5, 4.1, 5.1, 8.8, 6.1, and 5.6. Is the
North Americans (33.0). hypothesis supported? If so, how large is the
effect?
8. In an experiment, 10 participants were given
a test of mental performance in stressful 12. You expose 10 participants to red and blue
situations. Their scores were 2, 2, 4, 1, 4, 3, 0, rooms (in a counterbalanced order), and in
2, 7, and 5. Ten other participants were given each room you measure their levels of
the same test after they had been trained in humility. You are exploring the possibility
that people exposed to red rooms will be
more humble than people exposed to blue
rooms. Data are presented below; is there a
relationship between humility and room
color?
Person Red Room Blue Room
1 60 51
2 73 49
3 70 60
4 69 55
5 46 35
6 48 41
7 69 51
8 99 88
9 71 61
10 69 56

You might also like