Independent-Samples t-Test: How to Run It Online and Report It in APA7
The independent-samples t-test compares the means of two separate groups on a continuous outcome.
What is Independent-Samples t-Test?
The independent-samples t-test compares the means of two separate groups on a continuous outcome.
When to use it
Use it when different people are in each group, such as treatment versus control, or men versus women, and the outcome is continuous.
Example question: Do the treatment and control groups differ in mean anxiety?
Preparing your data
Long format: one row per participant, a column for the group (two categories) and a column for the outcome.
Example dataset (simulated; first rows of 70): id, group (Treatment or Control), anxiety (scale score); long format.
| id | group | anxiety |
|---|---|---|
| 1 | Treatment | 20.6 |
| 2 | Treatment | 11.7 |
| 3 | Treatment | 19.2 |
| 4 | Treatment | 14.0 |
| 5 | Treatment | 18.1 |
| 6 | Treatment | 20.0 |
Download the full example CSV to practise. If the tool asks for a different layout, follow the instructions on its page.
How to run it on StatFas
- Open the Independent-Samples t-Test tool. You do not need an account to run an analysis.
- Enter your data or upload your file, laid out as described in Preparing your data.
- Select your variables. Select the continuous outcome and the grouping variable with exactly two categories.
- Choose any options the tool offers (for example the confidence level, a post hoc test or the error bar type) and run the analysis.
- Read the results on the page. Check the assumptions first, then the test statistic, the p-value and the effect size.
- To save your results, log in or create a free account. Every analysis stays free; the account is only needed to download.
Assumptions and checks
- Independence: each participant is in only one group and does not influence the others.
- The outcome is roughly normal in each group (or each group has about 30 or more cases).
- Equal variances for Student's test; Welch's test relaxes this assumption and is recommended as the default.
- No extreme outliers.
Key numbers to look at
- Group means, SDs and sample sizes.
- Levene's test for equal variances, and the matching Student or Welch row.
- t(df), p and the mean difference with 95% CI.
- Cohen's d (or Hedges' g for small samples).
Effect size
Cohen's d = mean difference ÷ pooled SD: about 0.2 small, 0.5 medium, 0.8 large.
Benchmarks such as small, medium and large are conventions (Cohen, 1988), not rules. Interpret size in the context of your field.
Reporting Independent-Samples t-Test in APA7 style
Template
Worked example (simulated data)
The numbers below were computed from the example CSV above, so you can reproduce them. They illustrate the format and are not real findings.
APA7 reminders: italicise statistical symbols (M, SD, t, F, p, r), report exact p-values to two or three decimals (use p < .001 for very small values), omit the leading zero for values that cannot exceed 1 (.45, not 0.45), and put degrees of freedom in parentheses. See the APA7 cheat sheet.
Common mistakes
- Using it for repeated measurements on the same people.
- Choosing Student or Welch only after seeing which one gives a significant result.
- Omitting the group sizes and standard deviations.
Related analyses and alternatives
- Paired t-Test: The same people measured twice.
- Mann-Whitney U-test: Non-normal data or ordinal outcomes.
- One-way ANOVA: Three or more groups.
Not sure which analysis you need? Use the test chooser.
Frequently asked questions
Should I use Student's or Welch's t-test?
Welch's test is a safe default because it performs well whether or not the variances are equal and costs little power.
Why are my degrees of freedom not a whole number?
Welch's test adjusts the degrees of freedom for unequal variances, so they are often decimals. Report them to two decimals.
References
American Psychological Association. (2020). Publication manual of the American Psychological Association (7th ed.). https://doi.org/10.1037/0000165-000
Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Lawrence Erlbaum Associates.
This guide is for learning and for preparing results for your own reports. You remain responsible for choosing an appropriate analysis, checking its assumptions and interpreting the results. Follow the formatting rules of your journal or institution where they differ from APA7.