Our tutorials reference a dataset called "sample" in many examples. If you'd like to download the sample dataset to work through the examples, choose one of the files below:
The Paired Samples t Test compares two means that are from the same individual, object, or related units. The two means can represent things like:
The purpose of the test is to determine whether there is statistical evidence that the mean difference between paired observations on a particular outcome is significantly different from zero. The Paired Samples t Test is a parametric test.
This test is also known as:
The variable used in this test is known as:
The Paired Samples t Test is commonly used to test the following:
Note: The Paired Samples t Test can only compare the means for two (and only two) related (paired) units on a continuous outcome that is normally distributed. The Paired Samples t Test is not appropriate for analyses involving the following: 1) unpaired data; 2) comparisons between more than two units/groups; 3) a continuous outcome that is not normally distributed; and 4) an ordinal/ranked outcome.
Your data must meet the following requirements:
Note: When testing assumptions related to normality and outliers, you must use a variable that represents the difference between the paired values - not the original variables themselves.
Note: When one or more of the assumptions for the Paired Samples t Test are not met, you may want to run the nonparametric Wilcoxon Signed-Ranks Test instead.
The hypotheses can be expressed in two different ways that express the same idea and are mathematically equivalent:
H_{0}: µ_{1} = µ_{2} ("the paired population means are equal")
H_{1}: µ_{1} ≠ µ_{2} ("the paired population means are not equal")
OR
H_{0}: µ_{1} - µ_{2} = 0 ("the difference between the paired population means is equal to 0")
H_{1}: µ_{1} - µ_{2} ≠ 0 ("the difference between the paired population means is not 0")
where
The test statistic for the Paired Samples t Test, denoted t, follows the same formula as the one sample t test.
$$ t = \frac{\overline{x}_{\mathrm{diff}}-0}{s_{\overline{x}}} $$
where
$$ s_{\overline{x}} = \frac{s_{\mathrm{diff}}}{\sqrt{n}} $$
where
\(\bar{x}_{\mathrm{diff}}\) = Sample mean of the differences
\(n\) = Sample size (i.e., number of observations)
\(s_{\mathrm{diff}}\)= Sample standard deviation of the differences
\(s_{\bar{x}}\) = Estimated standard error of the mean (s/sqrt(n))
The calculated t value is then compared to the critical t value with df = n - 1 from the t distribution table for a chosen confidence level. If the calculated t value is greater than the critical t value, then we reject the null hypothesis (and conclude that the means are significantly different).
Your data should include two continuous numeric variables (represented in columns) that will be used in the analysis. The two variables should represent the paired variables for each subject (row). If your data are arranged differently (e.g., cases represent repeated units/subjects), simply restructure the data to reflect this format.
To run a Paired Samples t Test in SPSS, click Analyze > Compare Means > Paired-Samples T Test.
The Paired-Samples T Test window opens where you will specify the variables to be used in the analysis. All of the variables in your dataset appear in the list on the left side. Move variables to the right by selecting them in the list and clicking the blue arrow buttons. You will specify the paired variables in the Paired Variables area.
A Pair: The “Pair” column represents the number of Paired Samples t Tests to run. You may choose to run multiple Paired Samples t Tests simultaneously by selecting multiple sets of matched variables. Each new pair will appear on a new line.
B Variable1: The first variable, representing the first group of matched values. Move the variable that represents the first group to the right where it will be listed beneath the “Variable1” column.
C Variable2: The second variable, representing the second group of matched values. Move the variable that represents the second group to the right where it will be listed beneath the “Variable2” column.
D Options: Clicking Options will open a window where you can specify the Confidence Interval Percentage and how the analysis will address Missing Values (i.e., Exclude cases analysis by analysis or Exclude cases listwise). Click Continue when you are finished making specifications.
Click OK to run the Paired Samples t Test.
The sample dataset has placement test scores (out of 100 points) for four subject areas: English, Reading, Math, and Writing. Suppose we are particularly interested in the English and Math sections, and want to determine whether English or Math had higher test scores on average. We could use a paired t test to test if there was a significant difference in the average of the two tests.
Variable English has a high of 101.95 and a low of 59.83, while variable Math has a high of 93.78 and a low of 35.32 (Analyze > Descriptive Statistics > Descriptives). The mean English score is much higher than the mean Math score (82.79 versus 65.47). Additionally, there were 409 cases with non-missing English scores, and 422 cases with non-missing Math scores, but only 398 cases with non-missing observations for both variables. (Recall that the sample dataset has 435 cases in all.)
Let's create a comparative boxplot of these variables to help visualize these numbers. Click Analyze > Descriptive Statistics > Explore. Add English and Math to the Dependents box; then, change the Display option to Plots. We'll also need to tell SPSS to put these two variables on the same chart. Click the Plots button, and in the Boxplots area, change the selection to Dependents Together. You can also uncheck Stem-and-leaf. Click Continue. Then click OK to run the procedure.
We can see from the boxplot that the center of the English scores is much higher than the center of the Math scores, and that there is slightly more spread in the Math scores than in the English scores. Both variables appear to be symmetrically distributed. It's quite possible that the paired samples t test could come back significant.
T-TEST PAIRS=English WITH Math (PAIRED)
/CRITERIA=CI(.9500)
/MISSING=ANALYSIS.
There are three tables: Paired Samples Statistics, Paired Samples Correlations, and Paired Samples Test. Paired Samples Statistics gives univariate descriptive statistics (mean, sample size, standard deviation, and standard error) for each variable entered. Notice that the sample size here is 398; this is because the paired t-test can only use cases that have non-missing values for both variables. Paired Samples Correlations shows the bivariate Pearson correlation coefficient (with a two-tailed test of significance) for each pair of variables entered. Paired Samples Test gives the hypothesis test results.
The Paired Samples Statistics output repeats what we examined before we ran the test. The Paired Samples Correlation table adds the information that English and Math scores are significantly positively correlated (r = .243).
Why does SPSS report the correlation between the two variables when you run a Paired t Test? Although our primary interest when we run a Paired t Test is finding out if the means of the two variables are significantly different, it's also important to consider how strongly the two variables are associated with one another, especially when the variables being compared are pre-test/post-test measures.
Reading from left to right:
From the results, we can say that: