1
Independent Samples t test
This example uses data from Stroeb, Insko, Thompson, and Layton (1972) in the Journalof Personality and Social Psychology. Each college student in the study reviewed
materials describing a student of the opposite sex. The materials had been constructed toexpress opinions that were either similar or dissimilar to those held by the experimentalstudents. Students were randomly assigned to the two conditions: similarity anddissimilarity. Among the data collected were ratings, on a 7-point scale, of how much theexperimental student liked the target student.
When you start SPSS, the following will appear

Click on cancel and the SPSS data editor opens in the data view:

2

3
In the first column click on var and the variable view of the SPSS data editor isdisplayed:

4
Click on the white space in row 1 under name and you can type in the name of your firstvariable. Continue on for as many variables as you have. In my example I have twovariables. The first is called TMT, consists of the numbers 1 and 2, and indicates which
the level (similarity or dissimilarly) to which a student was assigned. The second is called
LIKE and indicated the liking rating.

The click on the data view tab at the bottom of the window and once it opens begin
typing the data. On the next page is an example:

5Once the data are typed in, click on analyze → compare means → independent samples ttest. The following screen is displayed

6Note that TMT is highlighted. Click on the arrow next to Grouping Variable and you get
the following screen:

Click on define groups to get the following screen:Type 1 in the white space opposite Group 1: and 2 in the white space opposite Group 2:

7

Click Continue. In the following screen

Highlight LIKE and click on the arrow for the Test Variable(s): slot. The screen shows

Click OK. Here are the results:

8

GET
FILE='C:\6481\spss\ttests\isttest.sav'.
DATASET NAME DataSet1 WINDOW=FRONT.
T-TEST
GROUPS = TMT(1 2)/MISSING = ANALYSIS/VARIABLES = LIKE/CRITERIA = CI(.95) .

T-Test[DataSet1] C:\6481\spss\ttests\isttest.sav

Group Statistics

LIKE

TMT
12

N60
60

Mean
5.70
3.27

Std. Error
Mean.145.176

Std. Deviation
1.124
1.364Independent Samples Test
Levene's Test for
Equality of Variances

FLIKE

Equal variances
assumedEqual variances
not assumed

2.176

Sig.
.143

t-test for Equality of Means

tdf

Sig. (2-tailed)

Mean
DifferenceStd. Error
Difference

95% ConfidenceInterval of the
Difference
Lower
Upper

10.664118.000

2.433

.228

1.981

2.885

10.664113.864

.000

2.433

.228

1.981

2.885

9
Dependent Samples t test
Ten rats were incised on either side of the back. One incision was closed withtape, the other with sutures. The method used to close the incisions was determined
randomly. The data are a measure of the tensile strengths of the wounds, ten days after
they were closed. These data are used to illustrate calculation of the dependent samples ttest.
Follow the same steps as in the independent samples t test to input the data, but do
not input an indicator for the treatment. Instead input one variable for each level of thewithin-subjects factor. In my example the first one is TAPE and the second is SUTURE.
TAPE contains the tensile strength measurements for tape-closed wounds and SUTURE.
contains the tensile strength measurements for suture-closed wounds.

Click Analyze → Compare means → Paired-Sample T Test to get the following screen:10Highlight TAPE and SUTURE and use the arrow to move these variables to the Paired
Variables: slot:

Then click OK. The results are on the following page,11T-Test[DataSet1] C:\6481\spss\ttests\dsttests.sav

Paired Samples Statistics

Pair1TAPE
SUTURE

Mean
620.10475.40N1010

Std. Deviation
170.381
162.217

Std. Error
Mean53.879
51.298Paired Samples CorrelationsN
Pair 1TAPE & SUTURE

10Correlation
.288

Sig.
.420

Paired Samples Test
Paired Differences

Pair 1TAPE - SUTURE

Mean
144.700

Std. Deviation
198.556

Std. Error
Mean
62.789

95% ConfidenceInterval of the
Difference
Lower
Upper
2.662
286.738

t2.305df
9Sig. (2-tailed).047