Dissertation Statistics Help

T-test calculator

Three designs share one test statistic but not one formula. This runs the t-test your design calls for and gives you the result a thesis reports.

A t-test compares means using the t distribution to judge whether a difference is larger than sampling variation alone would produce. This calculator runs all three forms a dissertation uses: the one-sample test against a fixed value, the paired-samples test on before-and-after differences, and the independent-samples test for two groups, with a choice of the Welch or pooled Student version. Each result gives t, the exact degrees of freedom, the two-tailed p-value, and Cohen's d.

t statistic

4.626

t(17.15) = 4.63, p = < .001

t4.626
Degrees of freedom17.15
p value (two-tailed)< .001
Group 1 mean (n = 10)82.800
Group 2 mean (n = 10)72.300
Mean difference10.500
Standard error2.270
Cohen's d2.069

The formula behind each t-test

Every t statistic divides a mean difference by its standard error. For one sample tested against a value μ₀:

t = (M - μ₀) / (s / √n)

The paired test uses the mean and standard deviation of the within-pair differences in the same formula, with df = n - 1. The independent-samples test divides the difference between the two group means by a standard error built from both groups. The pooled version assumes equal variances and uses df = n₁ + n₂ - 2; the Welch version does not, and uses the Welch-Satterthwaite approximation for the degrees of freedom, which is why its df is usually not a whole number. The two-tailed p-value comes from the exact t distribution, and Cohen's d standardises the difference by the pooled standard deviation.

Frequently asked questions

What is the difference between a paired and an independent t-test?

An independent-samples t-test compares the means of two separate groups, such as a treatment group and a control group made up of different people. A paired t-test compares two measurements taken on the same people, such as a score before and after an intervention, and works on the within-person differences. Using an independent test on paired data throws away the pairing and usually loses power, so the design dictates which test is correct.

When should I use Welch's t-test instead of Student's?

Welch's t-test does not assume the two groups have equal variances, so it is the safer default whenever the group standard deviations or sample sizes differ. Student's pooled t-test is only exactly correct when the variances are equal, and the cost of using Welch when they happen to be equal is negligible. Many statisticians now recommend Welch as the routine choice for an independent-samples comparison.

What does the p-value from a t-test tell you?

The p-value is the probability of obtaining a mean difference at least as large as the one observed if the true difference in the population were zero. A small p-value, conventionally below .05, means such a difference would be unlikely under the null hypothesis, so the null is rejected. The p-value says nothing about the size of the effect, which is why a t-test should always be reported alongside Cohen's d.

How many participants do I need for a t-test?

The number depends on the effect size you expect to detect, the significance level, and the power you want, not on a fixed rule of thumb. For a medium effect (Cohen's d of 0.5) at 80% power and a two-tailed test, an independent-samples t-test needs roughly 64 participants per group. Run a formal power analysis with the expected effect size before data collection rather than relying on a generic minimum.