How to Perform a T-Test in SPSS: Independent and Paired Samples
You’ve collected your data, entered it into SPSS, and now you need to compare two groups. Maybe you want to know if male students scored higher than female students on an exam. Or perhaps you need to determine whether your intervention actually improved test scores from pre-test to post-test.
What test do you use?
The answer is the t-test—one of the most commonly used statistical tests in quantitative research. Yet many Kenyan students struggle to run it correctly or interpret the output.
This step-by-step guide will walk you through both types of t-tests in SPSS: the independent t-test (comparing two different groups) and the paired t-test (comparing the same group at two different times). By the end, you’ll be able to run both tests confidently and interpret your results.
Struggling with your data analysis? At Proposal Writers Kenya, we help students run SPSS analysis, interpret outputs, and write up findings chapters. Get expert help with your data today.
Understanding the Two Types of T-Tests
Before opening SPSS, you need to know which test to use.
| Type | When to Use | Example |
|---|---|---|
| Independent T-Test | Comparing two different groups of people | Male vs. female exam scores; treatment group vs. control group |
| Paired T-Test | Comparing the same group at two different times | Pre-test vs. post-test scores; weight before vs. after a program |
The key difference is simple: independent groups are different people. Paired groups are the same people measured twice.
The null hypothesis for both tests is that there is no difference between the means. Your job is to determine whether the data provides enough evidence to reject that null hypothesis.
Assumptions of the T-Test (Check These First)
Before running any t-test, your data must meet certain assumptions. Violating them can invalidate your results.
Independent T-Test Assumptions:
Continuous dependent variable (e.g., exam scores, weight, income)
Two categorical, independent groups (e.g., male/female, treatment/control)
Independence of observations (no participant is in both groups)
No significant outliers
Normality – data approximately normally distributed in each group
Homogeneity of variances – equal variances across groups (checked via Levene’s test)
Paired T-Test Assumptions:
Continuous dependent variable
Paired observations (same subject measured twice)
No significant outliers in the differences
Normality of the differences
Don’t worry if this sounds technical. SPSS helps you check most of these automatically.
Step-by-Step: Independent T-Test in SPSS
Step 1: Prepare Your Data
Arrange your data with two columns: one for your grouping variable (e.g., Gender coded as 1=Male, 2=Female) and one for your test variable (e.g., ExamScore).
Step 2: Access the Dialog
Click: Analyze → Compare Means → Independent-Samples T-Test
Step 3: Assign Variables
Move your test variable (ExamScore) to Test Variable(s). Move your grouping variable (Gender) to Grouping Variable.
Step 4: Define Groups
Click Define Groups and enter the two values representing your groups (e.g., Group 1: 1, Group 2: 2). Click Continue.
Step 5: Run the Test
Click OK. SPSS will generate your output.
Step 6: Interpret the Output
First, look at the Group Statistics table. This shows the mean and standard deviation for each group. Which group has a higher mean?
Next, examine the Independent Samples Test table. This is where your answer lies.
Levene’s Test for Equality of Variances: Look at the Sig. column. If Sig. ≥ 0.05, use the “Equal variances assumed” row. If Sig. < 0.05, use the “Equal variances not assumed” row.
The t-test results: In your chosen row, look at Sig. (2-tailed) – this is your p-value.
If p < 0.05 → significant difference (reject the null hypothesis)
If p ≥ 0.05 → no significant difference (fail to reject the null)
Step 7: Report Your Results in APA Format
Use this template:
*An independent-samples t-test was conducted to compare [variable] between [group 1] and [group 2]. There was a [significant/no significant] difference in scores for [group 1] (M = X, SD = X) and [group 2] (M = X, SD = X); t(df) = X, p = X.*
Example: *An independent-samples t-test was conducted to compare exam scores between male and female students. There was a significant difference in scores for males (M = 72.5, SD = 8.3) and females (M = 68.2, SD = 7.9); t(38) = 2.15, p = 0.038.*
Step-by-Step: Paired T-Test in SPSS
Step 1: Prepare Your Data
Arrange your data with two columns: PreTest and PostTest. Each row represents one participant.
Step 2: Access the Dialog
Click: Analyze → Compare Means → Paired-Samples T-Test
Step 3: Select Paired Variables
Highlight PreTest and PostTest, then click the arrow to move them into the Paired Variables box.
Step 4: Run the Test
Click OK.
Step 5: Interpret the Output
First, look at the Paired Samples Statistics table. Compare the means of PreTest and PostTest. Did scores increase or decrease?
Next, examine the Paired Samples Test table.
Look at the Mean difference – this tells you the average change (PostTest minus PreTest)
Look at Sig. (2-tailed) – this is your p-value
If p < 0.05 → significant change
If p ≥ 0.05 → no significant change
Step 6: Report Your Results in APA Format
Use this template:
*A paired-samples t-test was conducted to compare [variable] at [time 1] and [time 2]. There was a [significant/no significant] difference in scores between [time 1] (M = X, SD = X) and [time 2] (M = X, SD = X); t(df) = X, p = X.*
Example: *A paired-samples t-test was conducted to compare student test scores before and after the intervention. There was a significant increase in scores from pre-test (M = 58.3, SD = 7.2) to post-test (M = 74.6, SD = 6.8); t(29) = -8.42, p < 0.001.*
Common Mistakes to Avoid
| Mistake | Why It’s Wrong | How to Fix |
|---|---|---|
| Using independent t-test for paired data | Violates independence assumption | Use paired t-test |
| Ignoring Levene’s test | Using wrong variance row gives incorrect p-value | Always check and choose correct row |
| Forgetting to check normality | Can invalidate results | Check assumptions first |
| Misinterpreting p-value as effect size | p-value doesn’t tell you how big the difference is | Also report Cohen’s d |
Frequently Asked Questions
What if my data is not normally distributed? Consider non-parametric alternatives: Mann-Whitney U for independent samples, Wilcoxon Signed-Rank for paired samples.
Can I run a t-test with unequal sample sizes? Yes, as long as the homogeneity of variance assumption is met.
What sample size do I need? General guideline: at least 30 per group for independent t-test; at least 30 total for paired t-test.
Conclusion
Running a t-test in SPSS doesn’t have to be intimidating. Remember the golden rule: independent groups = independent t-test; same group, two times = paired t-test. Always check your assumptions before running the test, use Levene’s test to choose the correct variance row, and let the p-value guide your conclusion.
With practice, these steps will become second nature. And when you report your results, include both the t-statistic and p-value using the APA format templates above.
Don’t have time to run your own analysis? At Proposal Writers Kenya, our statisticians can run your SPSS analysis, interpret every output, and write up your complete findings chapter. We handle everything from independent t-tests to complex regression models. Let us help you finish your data analysis – so you can focus on graduating.