The Within-Subjects t-test

 

John K. Adams

 

The within-subjects t-test differs from the between-subjects version in a fundamental way: The within-subjects version uses paired scores; specifically, a given subject provides two scores, and those two scores are combined into a single difference score for the analysis. The analysis, therefore, is based on a single sample of scores.

 

There are five steps to calculate a within-subjects t-test:

 

1.  Obtain a difference score ( ) for each subject.

 

2.  Determine the mean difference score ( ) for the sample.

 

3.  Estimate the population variance of difference scores (  ).

 

4.  Calculate the standard error of the difference score ( ).

 

5.  Calculate the t ratio.

 

The easiest way to understand the within-subjects t-test is through working an example. My method is to set up a table, with the columns of the table appropriately labeled; then you merely complete the table, column by column, in order. The experimental data occupy the leftmost columns of the table, and the calculations occupy the remaining columns.

 

For our example, let’s assume that a sample of 10 subjects was used, and that a given subject provided two data points: one for an “experimental” condition, and one for a “control” condition. Let’s further assume that we expected the experimental condition to outperform the control condition; so, to keep things simple, we obtained our difference scores ( ) by subtracting the Control score from the Experimental score while preserving the sign of the difference. After getting the difference scores, we went on to get the mean difference score ( ) which allowed us to complete the remaining columns. Here is the result:

 

Subject

Exp. Score

Ctl. Score

1

7

4

3

0.50

0.25

2

5

1

4

1.50

2.25

3

12

8

4

1.50

2.25

4

5

6

-1

-3.50

12.25

5

3

1

2

-0.50

0.25

6

6

4

2

-0.50

0.25

7

4

4

0

-2.50

6.25

8

8

2

6

3.50

12.25

9

9

6

3

0.50

0.25

10

7

5

2

-0.50

0.25

Sum

66.00

41.00

25.00

 

36.50

Mean

6.60

4.10

 

 

 

 

Before we go on with the calculations, let’s examine the null and alternate hypotheses for the within-subjects t-test:

 

 

Under the null hypothesis, the expected value of the mean difference score is zero. That makes sense because if you had each subject grab two scores from the same population, and then if you arbitrarily subtracted one score from the other for each subject, you would expect the average long-run difference score across subjects to be zero.

 

And now, continuing with our calculations, we need two more values before we can calculate t.

 

First we need the estimate of the population variance of difference scores:

 

 

Then we need the standard error of the difference:

 

 

 

Finally, we are ready to calculate t. The general equation is as follows:

 

 

 

And for our specific experiment we have:

 

.

 

From the tables, we find that the critical value for t(9) is 2.262. Because our observed t exceeds this value, we conclude that the means for the two conditions (6.60 vs. 4.10) are significantly different from each other. That is, we reject the null hypothesis that holds that the mean difference score is zero (as it would be if the pairs of scores had been sampled from the same population). Rather than sampling from one population, it seems more reasonable that our subjects took one score from one population and the other score from another population. That scenario seems to account for the observed difference between the experimental and control means.

 

The within-subjects t-test is interesting and it’s fun to work with it. But there is one thing to be very careful of: degrees of freedom. Remember that we determine the degrees of freedom based on the number of difference scores, not the number of original scores.