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 important complication gives the test its name.
The test statistic
You compare your sample mean x̄ to a hypothesized value μ₀, scaled by the standard error:
t = (x̄ − μ₀) / (s / √n)
The quantity underneath the line has a name that comes back in every chapter from here on. s/√n is the standard error of the mean, written SE, and it estimates how far a sample mean of this size typically lands from the population mean it is trying to measure. Two things go into it: how spread out the data are, and how many observations were averaged. More data shrinks it, which is why a larger study pins a mean down more tightly, and because the square root is doing the shrinking, quadrupling the sample only halves the SE. With the name in place the statistic reads t = (x̄ − μ₀)/SE, and what it counts is standard errors between your mean and the claim.
All three members of the family (one-sample, paired, independent) sit next to each other on the formula sheet, which is the quickest way to see how little actually 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, and that extra wobble means the statistic no longer follows the normal curve. It follows the t-distribution instead.
The t-distribution
The curve has an unusual byline. William Sealy Gosset joined the Guinness brewery in Dublin in 1899, and the work handed him a problem the statistics of the day did not solve: barley yields and malt extracts arrived in batches of four or five, not the hundreds that make the normal curve safe. He worked out how (x̄ − μ)/(s/√n) behaves at small n and published it in Biometrika in 1908 under the pen name Student, his employer having 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. Both the pen name and the letter stuck, which is why an introductory course teaches Student's t rather than Gosset's.
The t-distribution looks like the normal's slightly nervous cousin: same bell shape, centered at zero, but with heavier tails. Those fat tails say "with a small sample, extreme values are more common than the normal would predict." Its shape is governed by the degrees of freedom (df = n − 1). The smaller the sample, the fatter 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.
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.
Notice how at df = 5 you need a t beyond about ±2.57 to reach significance, but by df = 60 the critical value has shrunk back toward the familiar 1.96. As samples grow, the t-distribution becomes the normal distribution. That's why, 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 lies between them. Double both ends for a two-tailed test. A t of 2.60 on 14 degrees of freedom sits 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 bracket is enough to reject at α = .05 and not at α = .01, which is all a decision ever needs. 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 returns a verdict on one candidate value. An interval returns every value the data leave standing, which is the more useful object and the one a journal asks for beside the test. Building it takes nothing new. Keep the same x̄, the same s and the same n, and move the critical value to the other side of the arithmetic:
x̄ ± t* · s/√n
t* is read off Table D at df = n − 1, in the column under the confidence level you want. It plays the part z* played in the z-interval, and at every finite df it is the larger of the two. The extra width is what estimating σ costs, 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, closing in on the normal's 1.960 without ever quite 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 clears that line, so the week's readings are comfortably on the right side of it. To skip the arithmetic on your own column of numbers, the descriptives calculator prints the same interval.
Test and interval are two views of one calculation, so they cannot disagree. A 95% interval that excludes μ₀ is exactly a two-sided test rejecting μ₀ at α = .05, and an interval that contains it is a test that fails to reject. The interval carries more information for the same effort, since it also says how precisely you have measured the thing, which is why reporting only the p-value throws away work you have already done.
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 the same data give the same evidence with every sign flipped, including the sign of t. Nothing about the p-value changes, 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 applies here unchanged, on the differences: it is the interval for the average change, and reporting it upgrades "the training worked" to a sentence that names how much it worked 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, which is why choosing between the two is a design decision, not an analysis one.
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 rescue you.
- 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, and it is worth carrying in your head, because exam questions hang 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. That last line is the central limit theorem speaking: the test never needed the data to be normal, it needed the sampling distribution of x̄ to be, and by 40 observations the averaging has taken care of that whatever shape the raw numbers had. Outliers stay barred at every sample size because one extreme value shifts x̄ and inflates s at the same time, moving both halves of the statistic in ways that no amount of data averages 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, Problem 11 from a column of difference scores, and Problem 19 builds the confidence interval at two levels and asks whether sixteen mildly skewed observations are enough to allow a t procedure at all.
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 verdict. Run both on the same two-condition data and you get F = t² with an identical p-value, because a repeated-measures ANOVA on two levels is doing what the paired test does: analyzing each person's own difference score. The ANOVA earns its keep once there are three or more conditions, which is what repeated-measures ANOVA covers.