A t test is a statistical method used to check whether the average (mean) of one group or the difference between two group means is likely due to real effects or just random chance. It is one of the most common hypothesis tests in basic statistics, especially when sample sizes are small and population variance is unknown.

Core idea

  • A t test compares means while accounting for how spread out the data are and how many observations you have.
  • It produces a number called the t‑value, which is then used to compute a p‑value that tells you how likely your observed difference would be if there were actually no real difference (the null hypothesis).

Main types of t tests

  • One-sample t test: tests whether the mean of a single sample differs from a known or target value (for example, “Is the average score different from 50?”).
  • Independent two-sample t test: compares the means of two separate groups, like treatment vs control or group A vs group B.
  • Paired t test: compares two related measurements on the same subjects, such as “before vs after” scores.

When a t test is appropriate

  • Data are approximately normally distributed and measured on a continuous scale (like height, test scores, time).
  • Observations within each group are independent of each other.
  • For the usual independent t test, the groups have reasonably similar variances (homogeneity of variance), or a variant like Welch’s t test is used when variances differ.

What the results tell you

  • The t‑value reflects how large the difference in means is relative to the variability in the data and the sample size.
  • The p‑value answers: “If there really were no difference, what is the probability of seeing a difference at least this big just by chance?” A small p‑value suggests the difference is statistically significant.

Why it matters today

  • T tests are still a go‑to tool in A/B testing, medical trials, UX experiments, and business analytics because they offer a simple way to judge whether observed improvements or differences are likely to be real.
  • Even with modern machine learning methods, t tests remain a standard first check in reports, dashboards, and academic papers whenever two averages need to be compared.