Skip to main content
v2026.11,858 entries · CC-BY 4.0

Conditions for a t-Test: Independence, Normality and Equal Variances

The conditions for a t-test by variant: independence, normality and equal variances, with a Student versus Welch worked example and R, Excel and Python code.

Written and maintained by CASRAI Editorial Board

Last updated

A t-test compares means, and it is only trustworthy when the data match the model behind it. The conditions for a t-test are: the observations are independent (apart from the deliberate pairing in a paired design), the quantity being averaged is roughly normally distributed, and, for the classic Student version only, the two groups share a common variance. That last condition is a choice, not a precondition: Welch’s version drops it, and one widely cited paper argues Welch’s test should be the default.

What are the conditions for a t-test?

The conditions depend on which t-test you run. The table below separates them, because most lists online blur the three variants together.

Variant What is being averaged Conditions
One-sample The single sample of values Independent observations; the values come from a roughly normal distribution
Paired The within-pair differences Independent pairs; the differences are roughly normal. The raw scores need not be
Independent two-sample, Student Each group’s values Independence within and between groups; each group roughly normal; equal population variances
Independent two-sample, Welch Each group’s values Independence within and between groups; each group roughly normal; variances may differ

The NIST/SEMATECH e-Handbook defines the paired case as data with “a one-to-one correspondence between the values in the two samples,” and notes that for two independent samples the variances “may be assumed to be equal or unequal.” Delacre, Lakens and Leys (2017) state that “assumptions of normality and homogeneity of variance underlie” Student’s test. For the wider decision of which test to run, see the overview of one-sample, independent and paired t-tests.

Formula: where each condition enters

Each condition is visible in a formula. Using the NIST notation, with sample means Ȳ₁ and Ȳ₂, sample variances s₁² and s₂², and sample sizes N₁ and N₂:

  • Welch (variances not assumed equal): T = (Ȳ₁ − Ȳ₂) / √(s₁²/N₁ + s₂²/N₂), with the Welch-Satterthwaite degrees of freedom ν = (s₁²/N₁ + s₂²/N₂)² / [ (s₁²/N₁)²/(N₁ − 1) + (s₂²/N₂)²/(N₂ − 1) ].
  • Student (equal variances assumed): T = (Ȳ₁ − Ȳ₂) / (sp √(1/N₁ + 1/N₂)), where sp² = [(N₁ − 1)s₁² + (N₂ − 1)s₂²] / (N₁ + N₂ − 2) and the degrees of freedom are N₁ + N₂ − 2.
  • One-sample: T = (Ȳ − μ₀) / (s/√N), with N − 1 degrees of freedom; the null hypothesis is rejected when |T| exceeds the critical value t(1 − α/2, N − 1).

The pooled term sp² is where the equal-variance condition lives: it treats both sample variances as estimates of one common population variance. Welch’s formula never pools, so it has no such requirement. Independence is not a number in any of these formulas; it comes from how the data were collected, which is why no output table can confirm it. The degrees-of-freedom guide works through the pooled and Welch values side by side.

Worked example: the same data under Student and Welch

These numbers are an illustrative synthetic data set, not a real study. Group A has N₁ = 6 observations: 14, 16, 15, 18, 17, 15. Group B has N₂ = 8: 20, 25, 18, 27, 22, 24, 30, 19.

Quantity Group A Group B
Sum 95 185
Mean 95 / 6 = 15.833 185 / 8 = 23.125
Sample variance 2.167 17.268

The mean difference is 15.833 − 23.125 = −7.292. The group sizes are unequal and the variances differ by a factor of about 8, so this is exactly the situation where the equal-variance condition is in doubt.

Student: sp² = (5 × 2.167 + 7 × 17.268) / 12 = 10.976, so the standard error is √(10.976 × (1/6 + 1/8)) = 1.789 and T = −7.292 / 1.789 = −4.075 on 12 degrees of freedom (p = .0015).

Welch: the standard error is √(2.167/6 + 17.268/8) = √2.520 = 1.587, so T = −7.292 / 1.587 = −4.594. The degrees of freedom are 2.520² / [(0.3611²/5) + (2.1585²/7)] = 6.348 / 0.6917 = 9.18, giving p = .0012.

Both tests reject at α = .05 here, but they disagree on the statistic (−4.07 against −4.59), the degrees of freedom (12 against 9.18) and the p-value. With smaller or less lopsided differences the choice can decide the conclusion. Delacre et al. recommend Welch’s test as the default strategy for this reason.

How to check each condition

Condition Where it is checked If it looks violated
Independence The study design: how participants were sampled and assigned, not a statistical test If the same units are measured twice or matched, use the paired form; independent-groups formulas do not apply
Normality A Q-Q plot or histogram of the values (of the differences for a paired design) Consider a rank-based alternative such as the Mann-Whitney U test for two independent groups
Equal variances Compare the group variances; Levene’s test is the common formal check Use Welch’s t-test, which does not pool the variances

For the normality row, be careful with a two-step routine of “test normality first, then pick the t-test or the rank test.” Rochon, Gondan and Kieser (2012) simulated a Shapiro-Wilk pre-test that chose between Student’s t-test and the Mann-Whitney U test. They found that the two-stage procedure stayed within acceptable limits overall, but that the preliminary normality test seriously altered the conditional Type I error rates of the follow-up tests. They also note that with large samples the Shapiro-Wilk test “detects deviations from normality with nearly 100% power,” while with small samples it “lacks power to detect deviations from normality.” A graph and knowledge of the measurement are usually more informative than a p-value from a pre-test.

Assumptions and common mistakes

Applying the normality condition to the raw scores of a paired design

A paired t-test is a one-sample t-test on the within-pair differences, so the condition applies to the differences. Two skewed columns can produce well-behaved differences.

Treating the variance check as a gate

Because Welch’s test is available and does not need equal variances, there is no need to route every analysis through Levene’s test first. Delacre et al. argue that Welch’s test “should be used as a default strategy” in place of Student’s test.

Ignoring non-independence

Repeated measures on the same person, students nested in classrooms, or samples from the same household are not independent observations. No choice between Student and Welch repairs this; the design has to be modelled or analysed with a paired or clustered approach.

Checking normality of the pooled data

Pooling two groups with different means can look non-normal even when each group is fine. Check each group separately, or the differences for paired data.

How to report a t-test and its conditions

Name the version you ran, because “t-test” alone does not tell a reader whether variances were pooled. An APA-style sentence for the worked example reads: Welch’s t-test showed that Group B (M = 23.13) scored higher than Group A (M = 15.83), t(9.18) = −4.59, p = .001. Add an effect size and a confidence interval for the mean difference, and say how you judged normality (for example, by inspecting Q-Q plots). The guide to interpreting t-test results covers the full output block.

How to run it in Excel, R or Python

Excel. Use =T.TEST(array1, array2, 2, 3) for a two-tailed Welch (unequal variance) test. The third argument is the tails and the fourth is the type: 1 is paired, 2 is equal variance, 3 is unequal variance.

R. t.test(a, b) runs Welch’s test by default; add var.equal = TRUE for Student’s test and paired = TRUE for a paired design. See the t.test() walkthrough.

Python. With SciPy, from scipy import stats then stats.ttest_ind(a, b, equal_var=False) runs Welch’s test. On the worked-example data it returns t = −4.594, df = 9.18, p = .0012; equal_var=True returns the Student values above.

Frequently asked questions

What are the assumptions of a t-test?

Independent observations, roughly normal data (the differences, for paired data) and, for Student’s version only, equal variances in the two groups. Welch’s version removes the equal-variance assumption.

Do I need equal variances for a t-test?

Not if you use Welch’s t-test. Student’s test requires them; the NIST handbook states the variances may be assumed equal or unequal, and gives separate formulas for each case.

Does the data have to be normal for a t-test?

The test is derived for normally distributed data. In practice inspect a plot of each group (or of the differences), and treat a formal pre-test with caution given its behaviour at small and large sample sizes, described above.

What if the conditions are not met?

For unequal variances, switch to Welch. For doubtful normality with two independent groups, a rank-based test is an option; the parametric versus non-parametric comparison and the test-selection decision tree help choose. For non-independence, change the analysis design.

Sources

  • NIST/SEMATECH e-Handbook of Statistical Methods, Two-Sample t-Test for Equal Means and One-Sample t-Test (checked 2026-10-29).
  • Delacre, M., Lakens, D., and Leys, C. (2017). Why psychologists should by default use Welch’s t-test instead of Student’s t-test. International Review of Social Psychology, 30(1), 92-101. rips-irsp.com (checked 2026-10-29).
  • Rochon, J., Gondan, M., and Kieser, M. (2012). To test or not to test: Preliminary assessment of normality when comparing two independent samples. BMC Medical Research Methodology, 12, 81. https://doi.org/10.1186/1471-2288-12-81 (checked 2026-10-29).

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about Conditions for a t-Test: Independence, Normality and Equal Variances

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →

Ask CASRAI · Regulatory Radar

Research-admin question? Get an answer that links its sources.

An AI assistant specialized in research administration. Every answer links its sources to check before you act. 2 questions free, no account. $29/month after.

  • Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.
  • Every answer numbers its sources and links each one, so you can check the source yourself.