Lesson 3:
Computing a T-Test for Between-Subjects Designs
Purpose
This test is used to examine the effects of one independent variable on
one or more dependent variables and is restricted to comparisons of two
conditions or groups (two levels of the independent variable). The results
of this test enable you to determine if two means differ significantly.
Two basic experimental designs, between-subjects and within-subjects designs,
can be analyzed with a t-test. In this lesson, we will describe how to
analyze the results of between-subjects designs. It is important to distinguish
between these two types of designs because they require different versions
of the t-test. (For those of you who are familiar with statistics and SPSS,
the Independent Samples T-Test is used with between-subjects designs
and the Paired Samples T-Test is used with within-subjects designs.)
A two-group between-subjects design is one in which participants have
been randomly assigned to the two levels of the independent variable. In
this design, each participant is assigned to only one group, and consequently,
the two groups are independent of one another. For example, assume that
you are interested in studying the effects of two types of drugs (X, Y)
on reaction time. If you randomly assign some participants to the Drug
X group and other participants to the Drug Y group, then you are using
a between-subjects design. (In a within-subjects design, all participants
would receive both levels of the drug.)
An Example: Parental Involvement Experiment
Assume that you studied the effects of parental involvement (independent
variable) on students' grades (dependent variable). Half of the students
in a third grade class were randomly assigned to the parental involvement
group. The teacher contacted the parents of these children throughout the
year and told them about the educational objectives of the class. Further,
the teacher gave the parents specific methods for encouraging their children's
educational activities. The other half of the students in the class were
assigned to the no-parental involvement group. The scores on the first
test were tabulated for all of the children, and these are presented below.
Data Sheet for Parental Involvement Experiment
|
Student
|
Parental Involvement Condition
|
Test 1
|
| 01 |
Involvement |
78.6 |
| 02 |
Involvement |
64.9 |
| 03 |
Involvement |
100.0 |
| 04 |
Involvement |
83.7 |
| 05 |
Involvement |
94.0 |
| 06 |
Involvement |
78.2 |
| 07 |
Involvement |
76.9 |
| 08 |
Involvement |
82.0 |
| 09 |
No involvement |
81.0 |
| 10 |
No involvement |
69.5 |
| 11 |
No involvement |
73.8 |
| 12 |
No involvement |
66.7 |
| 13 |
No involvement |
54.8 |
| 14 |
No involvement |
69.3 |
| 15 |
No involvement |
73.5 |
| 16 |
No involvement |
79.4 |
Creating Your Data File: Key Point
There is a key point to keep in mind when creating a data file for an independent
samples t-test. That is, that you must create a column for your independent
variable condition. In this case, that is the parental involvement condition,
and you should create a numeric code that allows SPSS to know the parental
involvement condition that the score is in. So, the first part of your
data file might look like the one below, with three variables--one for
student number, one for parental involvement condition (using a code of
"1" for involvement and "2" for no involvement), and score on Test 1. Remember,
that in creating the data file, you should create a Variable Label for
each variable and Value Label for the parental involvement variable
(you can do this by clicking on the Labels field).
Data File for the Parental Involvement Experiment
Computing the t-test for the Parental Involvement
Experiment
Step 1. Click on
Statistics,
then Compare Means, then Independent Samples T-Test.
Step 2. Now, move the dependent
variable (in this case, labeled "test1") into the Test Variable
field.
Step 3. Move your independent variable
(in this case, "involve") into the Grouping Variable field. You
should be aware that Grouping Variable stands for your independent
variable.
Step 4. You will notice that there
are question marks in the parentheses following your independent variable
in the Grouping Variable field. This is because you need to define
the particular groups that you want to compare. To do so, click on Define
Groups, and indicate the numeric values that each group represents.
In this case, you will want to put a "1" in the field labeled Group
1 and a "2" in the field labeled Group 2. Once you have done
this, click on
Continue. Your independent-samples t-test screen
should look like that below.
Independent Samples t-test Figure
Step 5. Now click on OK to
run the t-test. You may also want to click on Paste in order to
create a record of what you have done.
Output from the t-test Procedure
As you can see below, the output from a t-test procedure is relatively
straightforward.
Output from Independent Samples t-test
-
The first table lists the number of participants (N), mean, standard deviation,
and standard error of the mean for both of your groups. Notice that the
value labels are printed as well as the variable labels for your variables.
-
The second table initially presents you with an F-test (Levene's test for
equality of variances) that evaluates the basic assumption of the t-test
that the variances of the two groups are approximately equal (homogeneity
of variance). If the F value reported here is very high and the significance
level is very low--usually lower than .05 or .01), then the assumption
of homogeneity of variance has been violated. If this is the case, you
should use the t-test in the lower half of the table, whereas if you have
not violated the homogeneity assumption, you should use the t-test in the
upper half of the table.
-
In this particular case, you can see that we have not violated the homogeneity
assumption, and we should use the t of 2.201, degrees of freedom of 13,
and the significance level of .046. Thus, our data show that parental involvement
has a significant effect on grades, t(13) = 2.201, p < .05.
Further Practice: Extending the Parental Involvement
Experiment
Assume that the course had three tests and you wished to examine the effects
of parental involvement on all three tests as well as a final term average.
So, to do this, assume that the test score you already have in your data
file is the score from the first test. Add the Test 2 and Test 3 scores
(shown below in the data file) for each of the 16 students. Once you have
done this, try to get SPSS to perform four t-tests--one for each of the
three term grades and one for the final grade average. (Note that you can
get SPSS to calculate the term average with the Transform Compute
menu.)
Datafile with the Addtion of Tests 2 and 3
If you have problems working through this example, you should look at
the steps below.
Step 1. To create a new variable
that represents the average of all three tests, click on
Transform,
then Compute. Type in the name of the variable that you wish to
create (e.g., "average") in the Target Variable field. In the Numeric
Expression field, type (or click on the appropriate characters) the
expression that represents the average. In this case, you might type the
following expression
| Target Variable |
Numeric Expression |
| average |
(test1 + test2 + test3)/3 |
Note that the three test scores are included within parentheses. This
is necessary because SPSS first performs operations that are within parentheses,
and that we want to add all the numbers before dividing. Make sure that
you also create a label for your new variable. Once you have created the
proper expression, click on
OK, and this should take you to the
SPSS data editor where you should see a new column that represents the
average of the three test scores.
Step 2. Now click on
Statistics,
then Compare Means, then Independent Samples t-test. You
should then move the four dependent variables (test1, test2, test3, average)
into the Test Variable field. Next, move the independent variable
(i.e., involve) into the
Grouping Variable field. Next, click on
Define Groups and indicate the two levels of your involve variable.
When you are finished, click on OK. The first portion of your output
should look like that below.
Output for the Average Variable
Return to Contents