Academy › Topic library › Going Deeper: Tests for Means (One-Sample, Two-Sample and Paired t)
Q-BOT ACADEMY · FREE VIDEO LESSON · 13 MIN
Going Deeper: Tests for Means (One-Sample, Two-Sample and Paired t)
All three tests ask the same question: is a difference in averages bigger than the noise? What changes is the noise. One sample against a target? One-sample t. Two separate groups? Two-sample t. The same items measured twice? Paired t. Pick the wrong one, and you measure the wrong noise. That's exactly what happened to Dwayne.
In short
One-sample t: one average against a target, n minus one degrees of freedom. Two-sample t: two independent groups. Use Welch unless the spreads are equal, then pooled with n one plus n two minus two. Paired t: the same items twice, a one-sample t on the differences, pairs minus one. Check independence, stability and rough normality. And always ask how big the difference is!
Check yourself
Priya gets a new coating thickness gauge and measures six frames with both gauges. New minus old: point oh four, point oh six, point oh two, point oh five, point oh three and point oh six mils. The average difference is point oh four three three, and s d is point oh one six three. Which is right? A: t is about six point five, with five degrees of freedom, past two point five seven one: the gauges read differently. B: t is about six point five, with ten degrees of freedom. C: use a two-sample t, because there are two gauges. Or D: t is point oh four three three over point oh one six three, about two point six five.
Show the answer
The answer is A. The same frames were measured twice, so it's paired. The standard error is point oh one six three over the square root of six: point oh oh six seven. T is point oh four three three over point oh oh six seven: about six point five, with six pairs minus one, five degrees of freedom. Past two point five seven one, with a p-value of about point oh oh one three: the new gauge reads a bit higher. B counted both columns. C ignored the pairing. And D forgot the square root of n. That's tests for means. Questions? Ask Q-Bot right here in the Academy. And one for the road: why did the paired t test bring a date to the dance? It never goes anywhere without its partner!
Where this topic is taught
This lesson is part of every free Academy course whose Body of Knowledge covers it. Each course puts it in context, with exercises and checks.
Full lesson transcript
The narration from the video, by chapter. Brindlewood Outdoor Furniture and its people are a fictional company used in every Q-Bot Academy lesson.
Intro
Brindlewood, the receiving lab, Wednesday. Ellen has samples of new self-leveling glides. Priya puts eight Harbor chairs on the flat plate and measures the rocking gap with the old glides, then with the new ones. Dwayne runs a quick test on his laptop. p equals point three four. They don't help! Marcus leans in. Same data, wrong test. Run the right one, and the answer flips!
Hey there, I'm Q-Bot. Welcome to the Q-Bot Academy. Today we're going deeper: tests for means! We'll work the one-sample t, the two-sample t, both the pooled and the Welch versions, and the paired t, with their formulas, their assumptions, and three Brindlewood examples. If hypothesis testing is new to you, start with the hypothesis testing video.
Which test? Why the math matters
Why does the math matter? All three tests ask the same question: is a difference in averages bigger than the noise? What changes is the noise. One sample against a target? One-sample t. Two separate groups? Two-sample t. The same items measured twice? Paired t. Pick the wrong one, and you measure the wrong noise. That's exactly what happened to Dwayne.
The five steps
Every test follows five steps. One: state the hypotheses. The null says no difference, and the alternative says there is one, either two-sided, not equal, or one-sided, greater or less. Two: set alpha, usually point oh five, before you look. Three: compute the test statistic. Four: compare it to the critical value from a t table, or compare the p-value to alpha. Five: decide, and say it in plain words. Reject the null, or fail to reject it. Never accept it.
The one-sample t
First, the one-sample t. It compares one average to a target value, mu zero. The formula: t equals x bar minus mu zero, over s divided by the square root of n, with n minus one degrees of freedom. On top, how far the average is from the target. Underneath, the standard error: how much an average of n readings normally wobbles. So t counts standard errors. Bad: divide by s alone. Good: divide by s over the square root of n.
Worked example 1: the leg saw
Worked example one. Lou rebuilt the stop on the leg saw, and Priya checks the target: four hundred fifty point oh oh millimeters. She measures ten legs in the lab. The average is four hundred fifty point oh six, and s is point oh six one. The standard error is point oh six one over the square root of ten: point oh one nine three. So t is point oh six over point oh one nine three: about three point one one, with nine degrees of freedom.
Two-sided at alpha point oh five, the t table gives two point two six two for nine degrees of freedom. Three point one one is past it, and the p-value is about point oh one three. Reject the null: the saw cuts a little long. The ninety five percent confidence interval tells the same story, from four hundred fifty point oh two to four hundred fifty point one oh: it misses the target. Now the practical question. Six hundredths of a millimeter, against a tolerance of plus or minus half a millimeter? Small! But it's a one-minute stop adjustment, so Lou nudges it back.
The two-sample t: pooled and Welch
Next, the two-sample t, for two separate groups. The pooled version assumes both groups have the same true spread. First, pool the variances: s p squared equals n one minus one, times s one squared, plus n two minus one, times s two squared, all over n one plus n two minus two. Then t equals x bar one minus x bar two, over s p times the square root of one over n one plus one over n two. Degrees of freedom: n one plus n two minus two.
The Welch version drops the equal-spread assumption. Each group keeps its own variance: t equals the difference in averages, over the square root of s one squared over n one, plus s two squared over n two. Its degrees of freedom come from a longer formula, usually a fraction, and software does it for you. Bad: pool by habit when the spreads clearly differ. Good: use Welch unless you have a reason to believe the spreads are equal. When they are equal, Welch loses almost nothing.
Worked example 2: two welding stations
Worked example two. Marcus compares weld pull strength at two welding stations. Station one: twelve welds, average fourteen hundred fifty two pounds of force, s thirty five. Station two: eight welds, average thirteen hundred ninety eight, s seventy. The difference is fifty four. Pooled: s p squared is about twenty six hundred fifty four, the standard error is twenty three point five, and t is two point three oh, with eighteen degrees of freedom. The p-value is about point oh three four.
Now Welch. Station one's piece is thirty five squared over twelve: about one hundred two. Station two's is seventy squared over eight: six hundred twelve and a half. The standard error is the square root of the sum: twenty six point seven. T is two point oh two, with about nine point four degrees of freedom, and a p-value of about point oh seven three. Fail to reject! The pooled test looked significant only because it borrowed station one's small spread for station two. The smaller group has double the standard deviation, and that's the real story. Lou checks station two's wire feed.
The paired t
Now, the paired t. When the same items are measured twice, before and after, or by two gauges, work with the differences. Take each item's difference, then run a one-sample t on those differences against zero. T equals d bar, the average difference, over s d divided by the square root of n, with n minus one degrees of freedom, where n is the number of pairs. Each item becomes its own control, so the item-to-item variation drops out.
Worked example 3: Ellen's glides
Worked example three, Ellen's glides. Eight chairs, old glides then new. The rocking gaps range from about point three to one point six five millimeters, because chairs differ. But every single chair improved, by point one three to point two seven. The average difference is point one nine nine, and s d is point oh four nine. The standard error is point oh four nine over the square root of eight: point oh one seven four. So t is about eleven point four, with seven degrees of freedom. The cutoff is two point three six five, and the p-value is below point oh oh oh one. The new glides help!
So why did Dwayne get point three four? He ran a two-sample t, as if the two columns were sixteen different chairs. Then the noise is the chair-to-chair spread, about point four millimeters, which swamps a point two millimeter improvement, and t is only point nine eight. The paired test removes that spread. Bad: two-sample on paired data. Good: paired, whenever each reading has a partner. And the reverse is also wrong: you can't pair two independent groups.
Assumptions and software
Now, the assumptions. All three need independent readings and a stable process, so check a control chart or a run chart first. They assume the averages are close to normal: with small samples, look at a normal probability plot of the data, or of the differences for paired data. With about thirty or more per group, the central limit theorem helps. The pooled test also needs equal variances. And the samples need to be random, or at least representative.
In a spreadsheet, the t test function takes both ranges, the number of tails, and the type: one for paired, two for pooled, three for Welch. The critical value comes from the two-tailed t inverse. One-sided tests put all of alpha in one tail, so for nine degrees of freedom the cutoff drops from two point two six two to one point eight three three. Decide on one-sided before you see the data, and only when the other direction truly doesn't matter.
Reading the result
So how do you read the result and decide? Compare t to the cutoff, or the p-value to alpha. Reject, and the data show the averages differ. Fail to reject, and you haven't shown a difference, which isn't proof there is none. Then ask how big: report the difference with its confidence interval, and compare it to the tolerance and the cost. And remember, a p-value is the chance of data this extreme if the null were true, not the chance the null is true.
Common mistakes
Common mistakes. One: the wrong test, like two-sample on paired data. Two: forgetting the square root of n in the standard error. Three: wrong degrees of freedom, like n instead of n minus one, or counting both columns for paired data, where n is the number of pairs. Four: pooling variances that clearly differ. Five: switching to a one-sided test after seeing the data, to sneak under alpha.
And misreadings. Significant doesn't mean important: Lou's leg saw was only six hundredths off. Not significant doesn't mean no difference: Welch on eight welds couldn't show one yet. A difference between two groups doesn't prove what caused it, unless you ran a controlled experiment. And a p-value from an unstable process means nothing: special causes first.
Recap
Let's recap. One-sample t: one average against a target, n minus one degrees of freedom. Two-sample t: two independent groups. Use Welch unless the spreads are equal, then pooled with n one plus n two minus two. Paired t: the same items twice, a one-sample t on the differences, pairs minus one. Check independence, stability and rough normality. And always ask how big the difference is!
Check yourself
Now, check yourself. Priya gets a new coating thickness gauge and measures six frames with both gauges. New minus old: point oh four, point oh six, point oh two, point oh five, point oh three and point oh six mils. The average difference is point oh four three three, and s d is point oh one six three. Which is right? A: t is about six point five, with five degrees of freedom, past two point five seven one: the gauges read differently. B: t is about six point five, with ten degrees of freedom. C: use a two-sample t, because there are two gauges. Or D: t is point oh four three three over point oh one six three, about two point six five. Pause the video if you want to think about it.
The answer is A. The same frames were measured twice, so it's paired. The standard error is point oh one six three over the square root of six: point oh oh six seven. T is point oh four three three over point oh oh six seven: about six point five, with six pairs minus one, five degrees of freedom. Past two point five seven one, with a p-value of about point oh oh one three: the new gauge reads a bit higher. B counted both columns. C ignored the pairing. And D forgot the square root of n.
That's tests for means. Questions? Ask Q-Bot right here in the Academy. And one for the road: why did the paired t test bring a date to the dance? It never goes anywhere without its partner!
Independent study material; not affiliated with or endorsed by ASQ. Body of Knowledge codes identify where the topic appears in each certification's published outline.