Confidence Intervals
A sample mean wobbles, and a confidence interval puts a fence around the wobble.
Before this Lesson
You break ten cylinders from a pour, and they average 4,720 psi. That's a fact about ten cylinders. What you need is a fact about the whole pour, and a different ten would have given you a different average. By the end of this Lesson, you can turn those ten breaks into "between 4,505 and 4,935 psi, with 95% confidence," and say exactly what that promises. It starts with how far an average can drift.
An average wobbles less than one value
Go back to the plant from The Normal Distribution, whose cylinders have psi and psi. Pull one cylinder, and it can easily land at 4,200 or 5,000. Now pull four and average them. For the average to land at 4,200, the four have to run low together, and any one that runs high drags the average back up. Highs and lows partly cancel, so averages bunch around more tightly than single values do.
How much more tightly? Add independent values and their variances add, so the sum has a standard deviation of . The sum itself grows like , but its wobble grows only like , and that gap is the cancelling at work. Divide the sum by to get the mean, and its wobble is
The Handbook lists this in its Dispersion, Mean, Median, and Mode Values section and just calls it a standard deviation. Everyone else calls it the standard error of the mean, and so will this Lesson. (The Handbook's "Standard Error of Estimate" belongs to regression and is something else.) The Handbook's Central Limit Theorem adds that for large , the mean is close to normal even when single values aren't. So the mean of values has its own normal curve, with the same center and a narrower width.
Every probability question about a single value now works for a mean, with one change: the ruler is instead of . With for the sample's mean, the Handbook prints this form under Sample Size:
From The Normal Distribution: in the Handbook's Unit Normal Distribution table, is below, is above, is both tails, and is within. For a negative , .
| 1.0 | 0.8413 | 0.1587 | 0.3173 | 0.6827 |
|---|---|---|---|---|
| 1.5 | 0.9332 | 0.0668 | 0.1336 | 0.8664 |
| 2.0 | 0.9772 | 0.0228 | 0.0455 | 0.9545 |
Adapted from the FE Reference Handbook, Unit Normal Distribution
Take a cutoff of 4,400 psi. One cylinder falls below it with , so the chance is , nearly one in three. The mean of 16 cylinders has a standard error of psi, so now and the chance is . One cylinder lands down there easily. Sixteen rarely conspire to.
Turning the question around
So far you've known and asked where lands. In the field it runs backward: you have one , and is what you're after.
The table says , so 95% of all sample means land within 1.96 standard errors of . Now notice that a distance doesn't care which end you measure from. If is within 1.96 standard errors of , then is within 1.96 standard errors of . So put a fence 1.96 standard errors to each side of whatever you got. For 95% of samples, is inside it.
That fence is a confidence interval. The Handbook's section on the Confidence Interval for the Mean μ of a Normal Distribution prints it for a known :
Read it as the sample mean, plus or minus a critical value times the standard error. The part after the plus or minus is the margin of error.
The is the share of samples you agree to miss, so 95% confidence means . A two-sided fence can miss on either side, so the misses split between two tails, and each tail holds . That's why the subscript is .
To find , find the row of the unit normal table where , which is also where and . The Handbook collects the usual answers in a short table of its own:
| Confidence | |||
|---|---|---|---|
| 90% | 0.10 | 0.05 | 1.6449 |
| 95% | 0.05 | 0.025 | 1.9600 |
| 99% | 0.01 | 0.005 | 2.5758 |
Adapted from the FE Reference Handbook, Values of Zα/2
What the 95% promises
The pour has one true mean. Nobody knows it, but it's a fixed number. What moves is the fence, since a different sample would have put it somewhere else. So the 95% can't be describing . It describes the method: run it on sample after sample, and about 95% of the fences catch .
Think of a ring toss. The peg never moves, and the thrower lands 95% of the tosses. Any one ring is either on the peg or it isn't, and the 95% is a fact about the thrower.
What about a value outside your interval, like a claimed true mean of 4,100 psi against your 4,152 to 4,348? You can't prove it wrong, because yours might be one of the rare misses. But believing it means believing you drew one of those unlucky samples, so at the 95% level it isn't a plausible value for the true mean.
When σ is unknown too
From Describing Data: is the sample's mean, and is its standard deviation, which divides by because deviations from the sample's own mean run slightly small.
Everything so far leaned on a known , the kind of number a plant gets from years of records. With ten cylinders from a new mix, all you have is the sample's own , so you swap it in. But is only an estimate, and it wobbles too. Some small samples happen to bunch together, their comes out too small, and the fence comes out too tight, missing more than 5% of the time.
The fix is a bigger multiplier. William Gosset worked it out around 1908 at the Guinness brewery and published as "Student," which is why the Handbook's table is titled Student's t-Distribution. The curve is a bell with heavier tails, because it carries the extra uncertainty in . To leave the same area in a tail, you have to go farther out.
The Handbook prints this interval right beside the first one, for when is not known:
Here has degrees of freedom, the same that divides inside . The table calls that number and runs it down the side. Across the top, is the area in one tail, as the sketch on the Handbook's table shows, so a two-sided interval reads the column for : the 0.025 column for 95%, and the 0.05 column for 90%.
| 0.05 | 0.025 | 0.005 | |
|---|---|---|---|
| 4 | 2.132 | 2.776 | 4.604 |
| 5 | 2.015 | 2.571 | 4.032 |
| 6 | 1.943 | 2.447 | 3.707 |
| 9 | 1.833 | 2.262 | 3.250 |
| 29 | 1.699 | 2.045 | 2.756 |
| ∞ | 1.645 | 1.960 | 2.576 |
Adapted from the FE Reference Handbook, Student's t-Distribution
Watch the highlighted column fall toward 1.960. With more data, is a better estimate of , the extra caution fades, and in the last row has become .
What sets the width
The full width of an interval is twice its margin of error:
Three things on the right can move.
- Confidence level. To catch more often you need a wider net, so higher confidence means a larger and a wider interval. Being surer costs you precision.
- Spread. Width grows in direct proportion to , so a steadier process gives a tighter interval.
- Sample size. Width shrinks with , not , so cutting it in half takes four times the samples.
The critical value itself depends on one more question, which is about and not about . If is known or stated, use , however small the sample. If has to be computed from the sample, use , which is how the Handbook's Test Statistics section puts it too. With a large sample, the two nearly agree: 2.045 against 1.960 at . Some textbooks switch to around , but the Handbook prints no cutoff.
How many samples you need
Often the margin comes first: pin down the mean within 50 psi, at 95% confidence. Write the margin as , and the only thing left to choose is . Solve for it:
The Handbook's Sample Size section prints this same equation with in place of , since the margin is how far may land from . The answer rarely comes out whole, and you can't test a fraction of a cylinder. The Handbook has no rounding rule, but the logic forces one: a smaller misses the target, so round up, even from a value barely past a whole number.