You have two separate groups of participants and one continuous outcome, and you want to know whether the group means differ. Men versus women on a stress scale, intervention versus control on exam performance, smokers versus non-smokers on lung capacity. That is the independent samples t-test, and it is probably the single most common analysis in undergraduate and master's theses. Here is the full procedure in SPSS: data setup, menu clicks, assumption checks, output tables, and the exact sentence to put in your results section.
When to Use the Independent Samples T-Test
The test compares the means of exactly two groups, where each participant belongs to one group and one group only. Nobody appears in both. This is what "independent" means: the observations in group 1 tell you nothing about the observations in group 2. If the same people were measured twice, you need the paired samples t-test instead, and if you have three or more groups, you need ANOVA.
Two measurement requirements. The dependent variable must be continuous, or at least treated as continuous: exam scores, reaction times, questionnaire totals, blood pressure. The grouping variable must be categorical with two levels. Likert-scale totals (a sum or mean across several items) are routinely analyzed with t-tests; a single 5-point item is more debatable, and many committees will push back on it.
The running example for this tutorial: 60 students, 30 assigned to online learning modules and 30 to traditional lectures, compared on a final exam scored 0 to 100. One continuous DV, two independent groups. Textbook case.
Setting Up Your Data in SPSS
This is where most first-time users go wrong. Do not create two columns, one for each group's scores. SPSS wants one row per participant, with two columns: one holding the exam score and one holding a numeric group code.
| Participant | Group | Exam_Score |
|---|---|---|
| 1 | 1 | 78 |
| 2 | 1 | 71 |
| 3 | 1 | 83 |
| 31 | 2 | 65 |
| 32 | 2 | 72 |
| 33 | 2 | 59 |
Code the groups as numbers: 1 = online, 2 = lecture (0 and 1 works just as well; be consistent). Then go to Variable View, find the Group variable, click the Values cell, and add value labels so the output prints "Online" and "Lecture" instead of raw numbers. Thirty seconds of setup that saves you from misreading the output later. Set the Measure column to Nominal for Group and Scale for Exam_Score.
Running the Test
The menu path is Analyze > Compare Means > Independent-Samples T Test. In newer versions (SPSS 27 and later) the menu reads "Compare Means and Proportions," but the dialog is the same.
- Move Exam_Score into the Test Variable(s) box. You can test several DVs at once, but each one produces its own t-test.
- Move Group into the Grouping Variable box. SPSS displays it as Group(? ?) with question marks, and the OK button stays greyed out. This trips up nearly everyone the first time.
- Click Define Groups, enter 1 for Group 1 and 2 for Group 2 (or whatever codes you used), then click Continue.
- Click OK.
The question marks exist because SPSS refuses to guess your codes. If your grouping variable has more than two levels, say three education categories, Define Groups lets you pick which two to compare, or you can use Cut Point to split a continuous variable. For a straightforward two-group design, just type the two codes and move on.
Checking Assumptions
Two assumptions worth checking before you trust the p-value. (Independence of observations is the third, but that is a design question, not something you can test in the output.)
Normality
Exam scores should be approximately normally distributed within each group, not in the pooled sample. Go to Analyze > Descriptive Statistics > Explore, put Exam_Score in the Dependent List and Group in the Factor List, click Plots, and check "Normality plots with tests." The output gives you a Shapiro-Wilk test per group. Values of p above .05 mean normality holds. In our example, the online group gave W = .97, p = .48, and the lecture group W = .96, p = .31. Both fine. The full logic, including what the Q-Q plots should look like and the skewness thresholds, is covered in our normality testing guide.
With 30 or more participants per group, the t-test tolerates mild non-normality reasonably well, so do not panic over a marginal Shapiro-Wilk result in a decent-sized sample. Severe skew in a small sample is a different story; see the section on failed assumptions below.
Homogeneity of variances
The classic t-test also assumes the two groups have similar variances. You do not need a separate procedure for this one. SPSS runs Levene's test automatically and prints it in the first two columns of the Independent Samples Test table. You will read it in a moment.
Reading the Output
SPSS returns two tables. The first, Group Statistics, is descriptive: n, mean, standard deviation, and standard error for each group. For our example:
| Group | N | Mean | Std. Deviation |
|---|---|---|---|
| Online | 30 | 74.20 | 8.10 |
| Lecture | 30 | 68.50 | 9.30 |
Sanity-check this table before anything else. If an n is wrong, your Define Groups codes or missing-value settings are off, and the t-test is testing the wrong data.
The second table, Independent Samples Test, has two rows: "Equal variances assumed" and "Equal variances not assumed." Which row you read depends on Levene's test, printed at the left of the table.
- Levene's Sig. > .05: variances are similar enough. Read the top row.
- Levene's Sig. ≤ .05: variances differ. Read the bottom row, which applies the Welch correction and adjusts the degrees of freedom (often to a decimal value like 54.3, which is normal and should be reported as printed).
A common misreading: students see Levene's Sig. = .519 and report it as their t-test p-value. Levene's test is only the gatekeeper that tells you which row to use. The t-test result sits further right in the same table.
In our example, Levene's test gave F = 0.42, p = .519, so we read the top row: t = 2.53, df = 58, Sig. (2-tailed) = .014, mean difference = 5.70, 95% CI [1.19, 10.21]. The confidence interval deserves more attention than it usually gets. It says the true difference between teaching methods plausibly lies anywhere from about 1 point to about 10 points on the exam. If the interval had crossed zero, the p-value would have been above .05. The two always agree.
Reporting in APA Format
The standard template:
An independent-samples t-test showed that students in the online condition (M = 74.20, SD = 8.10) scored significantly higher than students in the lecture condition (M = 68.50, SD = 9.30), t(58) = 2.53, p = .014, d = 0.65.
Older SPSS versions do not print Cohen's d (version 27 and later include it under the Effect Sizes option), but the hand calculation takes one line. Divide the mean difference by the pooled standard deviation. With equal group sizes, the pooled SD is simply the square root of the average of the two squared SDs: √((8.10² + 9.30²)/2) = 8.72. So d = 5.70 / 8.72 = 0.65. By Cohen's conventions, 0.2 is small, 0.5 medium, and 0.8 large, so this is a medium-to-large effect. Report d even when the result is non-significant; a reviewer wants to know whether you missed a real effect through low power or found genuinely nothing.
Two formatting details that examiners check. APA style drops the leading zero for p-values (p = .014, not p = 0.014), and SPSS output of ".000" should be written as p < .001, never p = .000.
What If Assumptions Fail?
Handle the two assumptions separately, because the fixes are different.
Unequal variances is the easy one. The fix is already sitting in your output: report the "Equal variances not assumed" row (the Welch t-test) with its adjusted degrees of freedom. No new analysis required. Some statisticians argue for reporting the Welch row by default regardless of Levene's result, and if your supervisor is one of them, nothing is lost by doing so.
Non-normality in a small sample calls for the Mann-Whitney U test, the rank-based alternative. In SPSS: Analyze > Nonparametric Tests > Legacy Dialogs > 2 Independent Samples. It compares the distributions through ranks rather than raw means, so heavy skew and outliers stop distorting the result. You give up a little power when the data actually are normal, roughly 5%, which is a cheap insurance premium for a thesis.
If you are unsure which route fits your design, Academic Stats Agent checks the assumptions on your actual data and picks the appropriate test automatically.
Key takeaway: Set up one row per participant with a numeric grouping variable, run Analyze > Compare Means > Independent-Samples T Test, and define your group codes. Use Levene's Sig. only to choose between the two output rows: above .05 read the top row, at or below .05 read the Welch row. Report means, SDs, t(df), the exact p-value, and Cohen's d. If normality fails in a small sample, switch to Mann-Whitney U.
Frequently Asked Questions
Which row of the Independent Samples Test table should I read?
Check Levene's test first. If its Sig. value is above .05, read the top row (Equal variances assumed). If it is .05 or below, read the bottom row (Equal variances not assumed), which applies the Welch correction and adjusts the degrees of freedom.
Can I run an independent samples t-test with unequal group sizes?
Yes. The test does not require equal group sizes. Unequal groups become a concern mainly when they occur together with unequal variances, in which case you should report the Welch (equal variances not assumed) row, which SPSS prints automatically.
What sample size do I need for an independent samples t-test?
To detect a medium effect (d = 0.5) with 80% power at α = .05, you need about 64 participants per group. Many student projects run with 20 to 30 per group, which only gives adequate power for large effects. A non-significant result from a small sample says more about power than about the absence of an effect.