## Lesson 4: Independent-Samples *t* Test

#### Objectives

- Conduct an independent-samples
*t*test. - Interpret the output of the
*t*test.

#### Overview

The independent-samples or between-groups *t* test is used to examine the effects of one independent variable on one dependent variable and is restricted to comparisons of two conditions or groups (two levels of the independent variable). In this lesson, we will describe how to analyze the results of a between-groups design. Lesson 5 covers the paired-samples or within-subjects *t* test. The reader should note that SPSS incorrectly labels this test a "T test" rather than a *t* test, but is inconsistent in that labeling, as some of the SPSS output also refers to *t*-test results .

A between-groups 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, suppose that you are interested in studying the effects caffeine consumption on task performance. If you randomly assign some participants to the caffeine group and other participants to the no-caffeine group, then you are using a between-groups design. In a within-subjects design, by contrast, all participants would be tested once with caffeine and once without caffeine.

#### 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:

Student |
Involve |
Test1 |

1 |
1 |
78.6 |

2 |
1 |
64.9 |

3 |
1 |
100.0 |

4 |
1 |
83.7 |

5 |
1 |
94.0 |

6 |
1 |
78.2 |

7 |
1 |
76.9 |

8 |
1 |
82.0 |

9 |
0 |
81.0 |

10 |
0 |
69.5 |

11 |
0 |
73.8 |

12 |
0 |
66.7 |

13 |
0 |
54.8 |

14 |
0 |
69.3 |

15 |
0 |
73.5 |

16 |
0 |
79.4 |

#### Creating Your Data File: Key Point

When creating a data file for an independent-samples* t *test in SPSS, you must also create a separate column for the grouping variable that shows to which condition or group a particular participant belongs. In this case, that is the parental involvement condition, so you should create a numeric code that allows SPSS to identify the parental involvement condition for that particular score. If this concept is difficult to grasp, you may want to revisit Lesson 2, in which a grouping variable is created for male and female students.

So, the variable view of your SPSS data file should look like the one below, with three variables--one for student number, one for parental involvement condition (using for example a code of "1" for involvement and "0" for no involvement), and one column for the score on Test 1. When creating the data file, is is a good idea to create a variable** Label **for each variable and **Value **label for the grouping variable(s). These labels make it easier to interpret the output of your statistical procedures. The variable view of the data file might look similar to the one below.

**Figure 4-1 Variable View **

The data view of the file should look like the following:

**Figure 4-2 Data View **

Note that in this particular case the two groups are separated in the data file, with the first half of the data corresponding to the parental involvement condition and the second half corresponding to the no-involvement condition. Although this makes for an orderly data table, such ordering is NOT required in SPSS for the independent-samples *t* test. When performing the test, whether or not the data are sorted by the independent variable, you must specify which condition a participant is in by use of a **grouping variable **as indicated above.

#### Performing the *t* test for the Parental Involvement Experiment

You should enter the data as described above. Or you may access the SPSS data file for the parental involvement experiment by clicking here. To perform the *t* test, complete the following steps in order.

Click on **Analyze**, then **Compare Means**, then **Independent Samples T Test**.

Figure 4-3 Select Analyze, Compare Means, Independent-Samples T Test

Now, move the dependent variable (in this case, labeled "Score on Test 1 [Test 1] ") into the **Test Variable** window. Then move your independent variable (in this case, "Parental Involvement [Involve]") into the **Grouping Variable** window. Remember that **Grouping Variable** stands for the levels of the independent variable.

Figure 4-4 Independent-Samples T Test dialog box

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 "0" in the field labeled **Group 1** and a "1" in the field labeled **Group 2**. Once you have done this, click on **Continue**.

Now click on **OK** to run the *t* test. You may also want to click on **Paste** in order to save the SPSS syntax of what you have done (see Figure 4-5) in case you desire to run the same kind of test from SPSS syntax.

Figure 4-5 Syntax for the independent-samples *t* test

### Output from the *t* test Procedure

As you can see below, the output from an independent-samples *t* test procedure is relatively straightforward.

Figure 4-6 Independent-samples *t* test output

#### Interpreting the Output

In the SPSS output, 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, making it easier to interpret the output.

The second table (see Figure 4-6) 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 or homoscedasticity). 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. In that 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. The *t-*test formula for unequal variances makes an adjustment to the degrees of freedom, so this value is often fractional, as seen above.

In this particular case, you can see that we have not violated the homogeneity assumption, and we should report the value of *t* as 2.356, degrees of freedom of 14, and the significance level of .034. Thus, our data show that parental involvement has a significant effect on grades, *t*(14) = 2.356, *p* = .034.