Advertisement
Advertisement

About T-Tests

Guide: T-Test

A t-test is a statistical test that determines whether there is a significant difference between means. It compares the observed difference to what we would expect by chance, accounting for sample size and variability.

The result is a t-statistic and a p-value. If the p-value is below your chosen significance level (usually 0.05), you conclude the difference is unlikely due to chance.

One-sample t-test: You have one group and want to compare its mean to a known reference value (e.g. "Is this class's average exam score different from the national mean of 70?")

Two-sample independent t-test: You have two separate, unrelated groups (e.g. control vs treatment, men vs women). Each participant appears in only one group.

Paired t-test: You have one group measured twice — before and after an intervention, or matched pairs. The same subjects appear in both conditions.

The p-value is the probability of observing a result as extreme as yours (or more extreme) if the null hypothesis were true. It is NOT the probability that the null hypothesis is true.

A p-value of 0.03 means: "If the groups were truly equal, we would see a difference this large or larger only 3% of the time by chance." With α = 0.05, this is considered significant — we reject H₀.

  • Normality: The data (or sampling distribution of the mean) should be approximately normal. With n > 30, the Central Limit Theorem means this is usually satisfied regardless of the data distribution.
  • Independence: Observations must be independent of each other.
  • Equal variances (two-sample): The Welch's t-test (default in most software) relaxes this assumption.
  • Random sampling: Data should be a random sample from the population of interest.

If normality is violated and your sample is small (<30), consider the Mann-Whitney U test.

A result can be statistically significant (p < 0.05) but practically meaningless, especially with large samples. Always report an effect size alongside your p-value. Use the Effect Size Calculator to compute Cohen's d and see how large the difference actually is.

One-sample: compare a sample mean to a known constant. Two-sample: compare means of two independent groups. Paired: compare two measurements on the same subjects (before/after).

The probability of getting a t-statistic at least as extreme as observed, assuming the null hypothesis is true. p < α = statistically significant result.