T-Test Guide
A t test compares a mean difference with its estimated standard error. The arithmetic depends on whether the data are one sample, two independent samples or matched pairs.
Method
- Choose one-sample mode when one sample mean is compared with a specified null mean.
- Choose Welch mode for two independent samples when you have each mean, sample SD and sample size; it does not assume equal population variances.
- Choose paired mode only when observations are matched in the same order, then enter both paired lists.
- Read the two-tailed p-value together with t and degrees of freedom, then check sampling design, outliers and distribution shape before interpreting the model.
Worked example
A one-sample result t = 5 with df = 24 has a very small two-tailed p-value under the null model.
For independent samples, Welch degrees of freedom can be non-integer because they are estimated from both sample variances and sizes.
Notes
- The page reports two-tailed p-values; it does not silently convert them into a one-sided test.
- Welch handles unequal variances but does not repair dependence, biased sampling or severe data-quality problems.
- For paired data, the t test is applied to the within-pair differences, so the pairing must be real rather than arbitrary row alignment.
Choose the t-test from the study design
A one-sample t-test compares one sample mean with a reference value. A paired t-test analyzes the mean of within-pair differences, such as before/after measurements on the same people. A two-sample Welch t-test compares means from two independent groups without requiring equal population variances.
Those tests are not interchangeable. If the same subjects appear in both conditions, treating the observations as independent throws away the pairing information. If the groups are independent, forcing them into a paired analysis invents a relationship that is not present in the data.
Read the statistic, degrees of freedom and p-value together
The t statistic measures how far the observed estimate is from the null value in standard-error units. Degrees of freedom describe the reference t distribution used for the calculation. The p-value is then the tail probability for a result at least as extreme under the null model and the selected one- or two-sided alternative.
A small p-value is evidence against the null model under the assumptions of the test; it is not the probability that the null hypothesis is true, and it does not by itself describe practical importance. Report the estimated difference and, when possible, a confidence interval alongside the test result.
Check assumptions before interpreting significance
T-tests assume observations are collected in a way that makes the modeled values independent at the appropriate level. Paired tests apply the distributional assumption to the pairwise differences. Strong outliers, heavy skew in a very small sample, dependence between observations or a poor sampling design can make the usual approximation misleading.
For independent groups with unequal variances, Welch's test is usually safer than the pooled equal-variance version unless there is a clear reason to assume equal variances. Statistical software can produce a number for almost any input, so the study design and data quality still determine whether that number answers the intended question.
Editorial review and limitations
Continue with the related tools
Use the linked tools for your own inputs and scenarios.
- Mean Confidence Interval Calculator — Calculate a normal-approximation confidence interval for a mean from the mean, standard deviation, sample size and confidence level.
- Standard Deviation Calculator — Calculate population and sample variance and standard deviation from a numeric data set.
- Normal Distribution Calculator — Calculate normal-distribution left-tail, right-tail and between-values probabilities, density, z-scores and inverse percentiles.