You often need to compare the means of two different groups. For example, you might want to know if students who study in the morning get higher test scores than students who study at night. The independent-samples t-test is the tool you need for this job. It tells you if the difference between your two group means is likely due to a real effect or just random chance.
When to Use an Independent-Samples T-Test
Use this test when you have one continuous variable and one categorical variable with exactly two groups. The groups must be independent. This means that a person cannot be in both groups at the same time. If your study design involves the same people measured at two different times, you should use a paired-samples t-test instead.
Assumptions of the Test
Before you run your analysis, check your data for three main things. First, your dependent variable should be measured on a continuous scale, like a test score or height. Second, the observations must be independent. Third, your data should be somewhat normally distributed within each group. Finally, the variance between your two groups should be about the same. SPSS helps you check this last point using Levene’s Test for Equality of Variances.
Step-by-Step SPSS Instructions
Follow these steps to conduct your analysis in SPSS:
- Open your dataset in SPSS.
- Click on the Analyze menu at the top.
- Select Compare Means, then click on Independent-Samples T Test.
- Move your continuous variable into the Test Variable box.
- Move your grouping variable into the Grouping Variable box.
- Click the Define Groups button.
- Enter the values you used to code your two groups, for example, 1 and 2.
- Click Continue and then click OK.
Understanding the Output
SPSS will give you two main tables. The first table shows Group Statistics, like the number of participants, the mean, and the standard deviation for each group. Use these numbers to describe your findings in your report.
The second table is the Independent Samples Test table. Look at the Sig. column for Levene’s Test. If this number is greater than 0.05, you can assume your groups have equal variances. You should then read the row labeled Equal variances assumed. If the Sig. value is 0.05 or lower, you should read the row labeled Equal variances not assumed.
Next, look at the Sig. (2-tailed) column for the t-test itself. This gives you the p-value. If this value is less than 0.05, you have a statistically significant result. This means the difference between your group means is unlikely to happen by chance.
How to Report the Results in APA 7
When you write your results, keep it simple. You need to report the t-statistic, the degrees of freedom, and the p-value. If you find a significant difference, you should also mention the mean scores and standard deviations for both groups.
Here is an example format:
An independent-samples t-test showed a significant difference in test scores between morning students (M = 85.00, SD = 5.20) and evening students (M = 78.50, SD = 6.10), t(38) = 3.65, p = .001. Students who studied in the morning performed better on the test than those who studied at night.
If your results are not significant, you might write: There was no significant difference in test scores between morning students (M = 82.00, SD = 5.50) and evening students (M = 81.50, SD = 5.80), t(38) = 0.28, p = .781.
Common Mistakes to Avoid
A frequent error is reporting p = .000 in your write-up. SPSS often shows .000 when the p-value is extremely small, but you should report this as p < .001 instead. Always check your grouping variable codes before you click OK, because if your codes are wrong, SPSS will not be able to identify your groups.
Do not confuse this test with the one-way ANOVA. If you have more than two groups, you must use the How to Run and Interpret a One-Way ANOVA in SPSS tutorial instead of a t-test. Running multiple t-tests to compare three or more groups increases the risk of making a Type I error, which is why ANOVA is the better choice for larger comparisons.
Frequently Asked Questions
What should I do if my data is not normally distributed?
The t-test is fairly strong, but if your sample size is very small and your data looks very skewed, you might look at a non-parametric test. However, for most research, the t-test remains a solid choice.
Do I need to report effect size?
Yes, it is very helpful. Cohen’s d is the most common effect size for a t-test. It tells your readers how large the difference is in practical terms, rather than just if it is statistically significant.
Can I use this test for categorical data?
No, your dependent variable must be continuous. If you have categorical data as your outcome, you should use a different type of analysis, such as a chi-square test.
If you need more help with your data analysis, head over to SPSS Solutions to see our other guides on statistical testing and research reporting.
