Section 1.13

One-Sample & Paired t-Tests

The one-sample t-test asks a simple question: is my sample's mean far enough from some claimed value to be more than chance? It's the hypothesis-testing logic applied to a single mean. One complication, estimating σ from the sample, is why the test uses the t-distribution.

The test statistic

You compare your sample mean x̄ to a hypothesized value μ₀, scaled by the standard error:

t = (x̄ − μ₀) / (s / √n)

The quantity under the line comes back in every chapter from here on. s/√n is the standard error of the mean, written SE. It estimates how far a sample mean of this size typically is from the population mean. Two things go into it: how spread out the data are, and how many observations were averaged. More data makes it smaller, so a larger study estimates the mean more precisely. Because n enters through a square root, quadrupling the sample only halves the SE. Written with SE, the statistic is t = (x̄ − μ₀)/SE: the number of standard errors between your mean and the claimed value.

The formula sheet puts all three t-tests (one-sample, paired, independent) side by side, so you can see how little changes between them.

This looks just like a z-score, except for one thing. We almost never know the population standard deviation, so we estimate it with the sample's s. That estimate is itself uncertain, especially with small samples, so the statistic no longer follows the normal curve. It follows the t-distribution.

The t-distribution

The t-distribution was published under a pen name. William Sealy Gosset joined the Guinness brewery in Dublin in 1899, where he met a problem the statistics of the day did not solve. Barley yields and malt extracts came in batches of four or five, and the normal curve is safe only with hundreds. He worked out how (x̄ − μ)/(s/√n) behaves at small n and published it in Biometrika in 1908 under the pen name Student. Guinness had barred staff from publishing under their own names after an earlier paper gave away production detail. R. A. Fisher later recast the result in the form used today and gave the statistic its letter. That is why courses still call it Student's t.

The t-distribution has the same bell shape as the normal and is centered at zero, but it has heavier tails: with a small sample, extreme values are more common than the normal would predict. Its shape depends on the degrees of freedom (df = n − 1). The smaller the sample, the heavier the tails, and the further out you must go to call a result significant.

🎮 The t-Distribution vs. the Normal

Shrink the degrees of freedom and watch the t-curve's tails fatten and its 5% critical value drift out past the normal's 1.96.

Sample size n6
Critical t* (two-tailed, .05)—
Normal's z* (for comparison)1.96
Extra margin from fat tails—
Two-tailed p, exact—
Two-tailed p, off Table D—

Slide the second control off zero to mark a t you have computed. The shaded area becomes its two-tailed p-value, and the readouts give both the exact number and the bracket a printed table lets you quote.

At df = 5 you need a t beyond about ±2.57 to reach significance, but by df = 60 the critical value is close to the familiar 1.96. As samples grow, the t-distribution becomes the normal distribution. So with large n, the t-test and a z-test give nearly identical answers. For the exact critical value at any df and α, and for the p-value behind a t you have already computed, use the statistical tables calculator.

Reading a t off a printed table

In an exam there is no calculator that returns a p-value, only Table D, and it prints critical values rather than areas. That changes the answer you are expected to give. Find the row for your df, run along it until your t falls between two entries, and read the two column headings: those are upper-tail areas, so your one-tail area is between them. Double both ends for a two-tailed test. A t of 2.60 on 14 degrees of freedom falls between the .02 column (2.264) and the .01 column (2.624). So the upper-tail area is between .01 and .02, and the two-tailed p is between .02 and .04. That is enough to decide: reject at α = .05, but not at α = .01. The exact value is .0210, and the marker in the interactive above shows both readings side by side.

The interval that goes with the test

A test gives a decision about one candidate value. An interval gives every value the data do not rule out. It is more useful, and journals ask for it beside the test. Building it takes nothing new: keep the same x̄, s and n, and use the critical value to set a margin around x̄:

x̄ ± t* · s/√n

t* comes from Table D at df = n − 1, in the column under the confidence level you want. It does the job z* did in the z-interval, and at every finite df it is larger than z*. The extra width comes from estimating σ, and it shrinks as the sample grows. For 95% confidence t* is 2.145 at df = 14, 2.045 at df = 29 and 1.984 at df = 100, approaching the normal's 1.960 without reaching it.

Worked, on a calculator. A monitoring station takes fifteen water samples from a river over one week and measures dissolved oxygen. The readings average x̄ = 7.8 mg/L with s = 1.24 mg/L. The standard error is 1.24/√15 = 0.320, Table D at df = 14 gives t* = 2.145 for 95% confidence, and the margin is 2.145 × 0.320 = 0.687. The interval is 7.8 ± 0.69, or [7.11, 8.49] mg/L. A common guideline puts healthy water at 6 mg/L or more, and the whole interval is above that line. To skip the arithmetic on your own column of numbers, use the descriptives calculator, which prints the same interval.

The test and the interval come from one calculation, so they cannot disagree. A 95% interval that excludes μ₀ means a two-sided test rejects μ₀ at α = .05, and an interval that contains μ₀ means the test fails to reject. The interval also tells you how precisely you have measured the mean. If you report only the p-value, you leave that information out.

The paired t-test: a clever reframe

What about before-and-after measurements on the same people: a weight-loss program, a training intervention, a drug trial? Those two columns aren't independent; each person is measured twice. The trick is to collapse them: compute each person's difference (after − before), and run a one-sample t-test on those differences against μ₀ = 0.

Written out, the hypotheses are about a single mean, the mean of the differences in the population:

H₀: μdifference = 0    H₁: μdifference ≠ 0

Decide which way you are subtracting before you start, and say so in the write-up. Take after − before and a positive mean difference means scores rose. Take before − after and every sign flips, including the sign of t, but the evidence is the same. The p-value does not change, but a reader who is not told the direction cannot tell an improvement from a decline, and neither can you three months later. The confidence interval above works the same way on the differences. It is the interval for the average change, so reporting it says how much the training changed scores and how precisely you know that.

Why pairing is powerful: by looking at within-person change, you cancel out the huge person-to-person variability ("Ana is just heavier than Ben") and isolate the effect of the treatment. A paired design often detects an effect that an independent-groups design would miss. Choosing between the two is a decision you make when you design the study, before any data are analyzed.

What you're assuming

  • The data (or the differences, for a paired test) are roughly normal, or the sample is large enough for the CLT to apply.
  • Observations are independent (for the paired test, the pairs are independent).

How normal does it actually have to be? Textbooks answer this with a rule of thumb in three sample-size bands. Learn it, because exam questions depend on it. Under n = 15, use t only when the data look close to normal and contain no outliers. From 15 up to 40, mild skewness is acceptable, though outliers still are not. Past 40, t is safe even when the data are clearly skewed. The last band comes from the central limit theorem. The test needs the sampling distribution of x̄ to be normal, not the data themselves, and by 40 observations the averaging has made it close to normal whatever shape the raw numbers had. Outliers are a problem at every sample size, because one extreme value shifts x̄ and inflates s at the same time, and more data does not average that away.

Why it matters: the one-sample and paired t-tests are the simplest members of a family that runs through the entire course. Understand the t-distribution here and the independent-samples t-test next is a short step.

Three practice problems run on this lesson. Problem 10 works the test from summary statistics and Problem 11 from a column of difference scores. Problem 19 builds the confidence interval at two levels and asks whether sixteen mildly skewed observations are enough for a t procedure.

Common questions

When should I use a paired t-test instead of an independent t-test?

Use paired when the two sets of scores belong to the same (or matched) units — before/after measurements, twins, left/right comparisons. The pairing lets you analyze within-unit differences, canceling stable individual differences and usually gaining a lot of power. Use the independent-samples test when the groups contain different, unrelated people.

What are degrees of freedom in a t-test?

Roughly, the number of values free to vary once you've estimated the necessary quantities. For a one-sample or paired test, df = n − 1 (estimating the mean uses up one). Degrees of freedom set the t-distribution's shape: small df means fatter tails and a stricter critical value, reflecting the extra uncertainty of estimating the SD from little data.

Is a paired t-test the same as a repeated-measures ANOVA with two conditions?

They give the same result. Run both on the same two-condition data and you get F = t² with an identical p-value. With two levels, a repeated-measures ANOVA does what the paired test does: it analyzes each person's own difference score. You need the ANOVA only when there are three or more conditions. Repeated-measures ANOVA covers that case.