The t test assumes that the data within each group are approximately normally distributed, but this assumption matters most for small samples and is less critical for larger ones. This article explains that core assumption, the others that must hold for a valid t test, and what to do when they are violated.
Formula
The one-sample t statistic is:
t = (x̄ − μ₀) / (s / √n)
- x̄ = sample mean (unit of the data)
- μ₀ = hypothesized population mean (unit of the data)
- s = sample standard deviation (unit of the data)
- n = sample size (count, unitless)
The denominator s / √n is the standard error of the mean. The resulting t value is compared against a t distribution with n − 1 degrees of freedom to obtain a p-value. For a two-sample t test, the formula expands to (x̄₁ − x̄₂) / √(s₁²/n₁ + s₂²/n₂) with Welch’s approximation for degrees of freedom.
Worked Example
Using the calculator defaults: n = 30, s = 5, d = 2 (meaning the sample mean is 2 units above μ₀).
- Compute the standard error: SE = 5 / √30 = 5 / 5.4772 = 0.91287
- Compute t: t = 2 / 0.91287 = 2.1909
- Degrees of freedom: df = 30 − 1 = 29
The calculator shows t = 2.191 and df = 29. A t of 2.191 with 29 df gives a two-tailed p-value of about 0.036, so at α = 0.05 you would reject the null hypothesis.
Assumptions
- Independence: observations are randomly sampled and not correlated with each other.
- Normality: the data (or the sampling distribution of the mean) are approximately normal.
- Scale: the dependent variable is continuous (interval or ratio).
- For the standard (Student’s) two-sample t test: equal variances between groups. Welch’s t test does not require equal variances.
- No significant outliers that distort the mean and standard deviation.
Why Normality Matters (and When It Doesn’t)
The t test is derived from the assumption that the sample mean follows a normal distribution. Thanks to the Central Limit Theorem, the mean of a sample approaches normality as the sample size grows, even if the underlying data are not normal. For n ≥ 30, the t test is generally robust to moderate non-normality. For very small samples (n < 15), severe skewness or heavy tails can inflate the Type I error rate (false positives) or reduce power. The key question is not whether your raw data are perfectly normal, but whether the sampling distribution of the mean is close enough to normal for the t distribution to be a good approximation.
How to Check Normality
- Visual: histogram with overlaid normal curve, Q-Q plot (points should fall roughly along the diagonal line).
- Numerical: Shapiro-Wilk test (best for small samples, n < 50), Anderson-Darling test, or Kolmogorov-Smirnov test (with caution, as it is less powerful).
- Skewness and kurtosis: values between −2 and +2 are often considered acceptable for t test use.
- Rule of thumb: for n > 30–40, the t test is usually fine unless the data are extremely skewed or have severe outliers.
Remember that normality tests answer a different question: “is there evidence of non-normality?” With large samples, even trivial deviations become significant, so always combine tests with visual inspection.
What to Do When Normality Fails
If your data are clearly non-normal and your sample is small, you have several options:
- Use a non-parametric alternative: Mann-Whitney U test (two independent groups) or Wilcoxon signed-rank test (paired or one-sample). These test medians or distributions, not means, and do not require normality.
- Transform the data: log, square root, or Box-Cox transformations can make skewed data more normal. Then run the t test on the transformed values.
- Use a permutation test or bootstrap: these resampling methods do not rely on normality and can test the mean directly.
- If the sample is large (n > 30–40), you may proceed with the t test anyway, as the Central Limit Theorem usually ensures the mean is approximately normal.
Always report what you did and why. A common mistake is to switch to a non-parametric test without checking whether the violation is severe enough to matter.
Common Misconceptions
- “My data must be perfectly normal.” No, approximate normality is enough, especially for larger samples.
- “Normality applies to the combined data.” For a two-sample t test, each group should be roughly normal, not the pooled distribution.
- “The t test is useless for skewed data.” Not true; it can still work for large samples or after transformation.
- “Equal variances are part of the normality assumption.” No, they are separate assumptions. Use Welch’s t test if variances differ.
- “Outliers are okay if the test is robust.” Outliers can severely affect the mean and standard deviation, so they should be investigated, not ignored.
Alternatives to the t Test
- Mann-Whitney U test: for two independent groups, does not assume normality, works with ordinal data.
- Wilcoxon signed-rank test: for paired samples or one-sample median tests.
- Welch’s t test: does not assume equal variances, recommended by default in many software packages.
- ANOVA: for comparing more than two groups; it also assumes normality and homogeneity of variances.
- Bootstrap confidence intervals: can be used for the difference in means without normality assumptions.
Choose the alternative based on your research question, data type, and sample size. If you need to compare means and the normality assumption is mildly violated, a bootstrap or Welch’s t test often works well.
Frequently Asked Questions
Is the normality assumption required for the t test?
Strictly, yes, but it is a requirement on the sampling distribution of the mean, not necessarily the raw data. For n ≥ 30, the Central Limit Theorem makes the t test robust to non-normality. For small samples, you should check normality and consider alternatives if it fails.
What sample size makes normality unnecessary?
There is no universal cutoff, but n = 30 is a common rule of thumb. For very skewed data, you may need n > 50 or more. For nearly normal data, even n = 10 can be fine. Always look at the data, not just the sample size.
Can I use a t test with ordinal data?
Technically, the t test assumes continuous data. Ordinal data (e.g., Likert scales) are often treated as continuous in practice, but this is controversial. If the scale has many categories (e.g., 7-point), the t test is usually acceptable; for 2–4 categories, consider a non-parametric test.
What is the difference between Student’s t test and Welch’s t test?
Student’s t test assumes equal variances between groups; Welch’s t test does not. Welch’s is more reliable when sample sizes or variances differ, and it is the default in R and many other software. If variances are equal, both give similar results.
How do I report the results of a t test?
Report the test statistic (t), degrees of freedom (df), and p-value, for example: t(29) = 2.19, p = 0.036. Also report the means and standard deviations of each group, and the confidence interval for the difference.
Does the t test require the data to be symmetric?
Not exactly, but severe skewness is a problem for small samples. The t test is based on the mean, which is sensitive to skewness. If the data are skewed, the mean may not be a good measure of central tendency, and the t test may have low power or inflated error rates. Consider a transformation or a non-parametric test.
Related
Formula used
in n | Sample size | - | 30 | 2 in s | Sample standard deviation | - | 5 | 0.001 in d | Expected difference (mean - mu0) | - | 2 | 0.001 out t | t statistic | - | d / (s / sqrt(n)) | 3 out df | Degrees of freedom | - | n - 1 | 0 out se | Standard error of the mean | - | s / sqrt(n) | 3
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation with the constants and conversion factors written on the page, rounded as each result states. See method and constants, the disclaimer or report an error.
More in this section
- Normality to g/L Converter & Formula29.220 g/L
- Normality to meq/mL Conversion Calculator1.0000 meq/mL
- Normality Test Q-Q Plot: How to Read It
- Normality Test Results: How to Analyze Them
- Normality Slay the Spire?
- Normality Test for Paired t Test: How to Check