One-Sample T-Test

What Is the One-Sample T-Test?

The one-sample t-test is used when you want to compare the average of a single group of observations to a specific known or hypothesized value. Unlike the independent or paired t-tests, which compare two sets of scores, the one-sample version asks a simpler question: does the mean of my sample differ from a particular number?

Why Do We Need It?

Imagine an educational researcher who knows that the national average score on a standardized reading test is 100. She collects data from 40 students at a particular school and finds their average is 105. That looks higher — but could the difference simply reflect the kind of random variation you would expect from any sample of 40 students? The one-sample t-test answers this question by telling you whether your sample mean is far enough from the reference value that the difference is unlikely to be due to chance.

How Does It Differ from a Z-Test?

You may come across a related test called the z-test, which answers the same basic question. The crucial difference lies in what you know about the population. A z-test requires you to know the population standard deviation — that is, the true spread of scores in the entire population. In practice, we almost never know this value. The one-sample t-test was developed precisely for this common situation: it uses thesample standard deviation as an estimate of the population spread. Because this introduces extra uncertainty, the t-test relies on a slightly wider distribution (the t-distribution) rather than the normal distribution used by the z-test. As sample size grows, the t-distribution closely resembles the normal distribution, so the two tests give nearly identical results with large samples.

How Does It Work?

The test computes a t-statistic by taking the difference between your sample mean and the hypothesized value and dividing it by the standard error of the mean. The standard error measures how much you would expect a sample mean to bounce around from one random sample to the next; it is calculated by dividing the sample standard deviation by the square root of the sample size.

A larger absolute t-value means the sample mean is further from the hypothesized value relative to the variability in your data. The test then gives you a p-value, which is the probability of seeing a t-value at least as extreme as yours if the true population mean really were equal to the hypothesized value. If the p-value falls below your significance level (typically 0.05), you conclude that your sample mean is significantly different from the reference value.

What Does the Result Mean?

A significant result tells you that it would be very unlikely to observe a sample mean as far from the hypothesized value as yours if the population mean truly equalled that value. In our reading-test example, a significant result would suggest that students at the school really do score differently from the national average. A non-significant result means you do not have sufficient evidence to conclude that the school's average differs from the national figure — but it does not prove the two are identical.

Key Assumptions

  • Continuous data: The variable you are measuring should be on a continuous (interval or ratio) scale — for example, test scores, reaction times, or weights.
  • Independence: Each observation should be independent of the others. Collecting one score should not influence any other score in your sample.
  • Approximate normality: The data should be roughly normally distributed. With larger samples (typically 30 or more), the test is robust to moderate departures from normality because the sampling distribution of the mean becomes approximately normal regardless of the shape of the underlying data.
  • No severe outliers: Extreme values can distort the sample mean and inflate the standard deviation, potentially misleading the test. Always check your data for outliers before running the analysis.

When to Use It

Use the one-sample t-test whenever you have one group of observations and a specific reference value you want to compare them against. This reference might be a population mean published in the literature, a benchmark target, or a theoretically meaningful number (like zero). If instead you want to compare two groups of different people, you need an independent samples t-test. If you are comparing two measurements from the same people, you need a paired samples t-test.

A Quick Example

A nutritionist wants to know if the average daily calorie intake of a group of university students differs from the recommended 2,000 calories. She surveys 50 students and finds a mean intake of 2,180 calories with a standard deviation of 420. She runs a one-sample t-test comparing the sample mean to 2,000. The resulting t-value is 3.03, with a p-value of 0.004. Because 0.004 is well below 0.05, she concludes that the students' average intake is significantly higher than the recommended level.

The one-sample t-test is a foundational tool for situations where you have a clear benchmark and want to know whether your data deviate from it. It is simple to compute, easy to interpret, and widely applicable across the social and health sciences.