Independent-samples t test
The independent-samples t test compares the means of two separate groups (e.g. men vs women). StatLab always shows both the pooled-variance row and the Welch row, with Levene's test to choose between them.
Menu: Analyze → Compare Means → Independent-Samples T Test…
When should I use Independent-samples t test?
- One scale outcome, one grouping variable with two groups of different people.
What are the assumptions?
- Independent observations.
- Outcome roughly normal within each group (or reasonably large groups).
- Equal variances for the pooled row — check Levene's test; if Sig. < .05 report the Welch row (“Equal variances not assumed”).
How do I run it in StatLab?
- Choose test variable(s) and the grouping variable.
- Leave the group values blank to use the first two codes, or type them (e.g. 1 and 2).
How do I read the output?
| Output | Meaning |
|---|---|
| Group Statistics | N, mean, SD and standard error per group. |
| Levene's Test F, Sig. | Tests equal variances. Sig. < .05 → use the second row. |
| t, df, Sig. (2-tailed) | The test itself. Welch df is fractional. |
| Mean Difference, 95% CI | Group 1 minus group 2 and its confidence interval. |
| Cohen's d / Hedges' g | Standardised difference (pooled SD). ~0.2 small, 0.5 medium, 0.8 large; g corrects d for small samples. |
Worked example
Compare score by gender (1 = Male, 2 = Female) in the bundled sample dataset (File → Sample dataset: 150 survey respondents with gender, programme group, age, pre/post test scores, five satisfaction items, income, smoking and education): Levene p = .299 so the pooled row applies; t(148) = 0.61, p = .542.
How would I report it in APA style?
Wellbeing scores did not differ significantly between men (M = 69.86, SD = 7.62) and women (M = 69.07, SD = 8.34), t(148) = 0.61, p = .542, d = 0.10, 95% CI of the difference [−1.78, 3.37].
Numbers above were computed by StatLab’s validated engine from the sample dataset when this page was built.
What are common mistakes?
- Using it for before/after data on the same people — that is the paired t test.
- Running many t tests across three or more groups instead of one ANOVA.