Academy › Topic library › Going Deeper: Confidence Intervals for Means, Proportions and Variances
Q-BOT ACADEMY · FREE VIDEO LESSON · 13 MIN
Going Deeper: Confidence Intervals for Means, Proportions and Variances
A single number from a sample hides how far off it could be. Accept a lot, claim a process is capable, report a survey, and you're betting on that number. A confidence interval puts the uncertainty on the table: here's our estimate, and here's the range of values the data can't rule out. Decisions made on ranges hold up!
In short
Every interval is an estimate, plus or minus a critical value times a standard error. Means use z when sigma is known and t when it isn't. Proportions need n times p hat of at least five, or an exact interval. Variances use chi-square and need normal data. The confidence is in the method. Compare the whole interval to the requirement, then decide!
Check yourself
Priya pull-tests sixteen welds after a new contact-tip schedule. The average is fourteen fifty pounds-force, and s is forty. With fifteen degrees of freedom, t is two point one three one. What's the ninety five percent confidence interval for the mean? A: fourteen thirty point four to fourteen sixty nine point six. B: fourteen twenty eight point seven to fourteen seventy one point three. C: thirteen sixty four point seven to fifteen thirty five point three. Or D: fourteen forty four point seven to fourteen fifty five point three.
Show the answer
The answer is B. The standard error is forty over the square root of sixteen, forty over four: ten. The margin is two point one three one times ten: twenty one point three. So, fourteen twenty eight point seven to fourteen seventy one point three. A uses z instead of t. C forgets to divide s by the square root of n. And D divides by n instead of its square root. That's confidence intervals for means, proportions and variances. Questions? Ask Q-Bot right here in the Academy. And one for the road: how does a confidence interval answer, how are you doing? Somewhere between fine and great, with ninety five percent confidence!
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, slat mill two, Monday morning. Since Lou's feed-roller fix, Priya has measured ten slats. The average is nineteen point oh four millimeters, with a standard deviation of point oh nine. Dwayne grabs the marker. Nineteen point oh four, so it's off center. And a spread of point oh nine? That's a capability of about one point eight five. Done! Marcus caps the marker. Those are best guesses from just ten slats. The real question is: how sure are we?
Hey there, I'm Q-Bot. Welcome to the Q-Bot Academy. Today we're going deeper: confidence intervals for means, proportions and variances! We'll build each interval step by step, read it the right way, plan a sample size, and meet two cousins, the prediction and tolerance intervals. If hypothesis testing is new to you, start with the hypothesis testing video.
Why the math matters
Why does this math matter? A single number from a sample hides how far off it could be. Accept a lot, claim a process is capable, report a survey, and you're betting on that number. A confidence interval puts the uncertainty on the table: here's our estimate, and here's the range of values the data can't rule out. Decisions made on ranges hold up!
Intervals for a mean
First, the point estimate: the single best guess. The sample average estimates the process mean, mu. P hat estimates the true proportion, and s squared estimates the variance. Good estimators are unbiased, right on average over many samples, and efficient, bouncing around as little as possible. For normal data, the average beats the median: the median's standard error is about one and a quarter times bigger. One catch: s squared is unbiased, but s itself runs slightly low in small samples.
Every interval in this video has the same shape. Estimate, plus or minus a critical value, times the standard error. That product is the margin of error. The critical value sets the confidence level, and the standard error comes from the sample.
Start with a mean when sigma is known from long, stable history. The interval is x bar, plus or minus z, times sigma over the square root of n. For ninety five percent, z is one point nine six. For ninety, one point six four five, and for ninety nine, two point five seven six, from a z table or the spreadsheet's standard normal inverse. Coating has a known sigma of point one two mils, and twenty five frames average three point oh four. The standard error is point one two over five: point oh two four. Times one point nine six: point oh four seven. So the interval runs from two point nine nine three to three point oh eight seven mils. More confidence means a wider interval. You can't get more sure for free!
Usually sigma is unknown, so we use s, and the t distribution with n minus one degrees of freedom. The interval is x bar, plus or minus t, times s over the square root of n. The conditions: a random sample, independent readings, a stable process, and roughly normal data or a large enough n. Bad: plug s into the z formula with ten readings. Good: use t, which widens the interval to pay for not knowing sigma.
Worked example 1: slat thickness
Worked example one: Priya's ten slats. The average is nineteen point oh four, and s is point oh eight nine eight. The standard error is s over the square root of ten: point oh two eight four. With nine degrees of freedom, the t table, or the spreadsheet's two-tailed t inverse, gives two point two six two. The margin is two point two six two times point oh two eight four: point oh six four. So the interval runs from eighteen point nine seven six to nineteen point one oh four millimeters.
Now read it. The target, nineteen point oh, sits inside the interval. So ten slats give no evidence that the mill runs off center. Dwayne's point oh four could easily be sampling noise. That matches a two-sided t test of nineteen point oh: the p-value is about point one nine, so we fail to reject. That's not proof the mill is centered. It just isn't shown to be off. And any value outside a ninety five percent interval would be rejected by that test at alpha point oh five.
So what does ninety five percent mean? It's about the method, not this one interval. Marcus simulated twenty samples of ten slats from a mill truly centered on nineteen point oh. Nineteen intervals caught the true mean, and one missed. Over ten thousand samples, about ninety five percent caught it. Bad: there's a ninety five percent chance the true mean is in this interval. Good: this interval came from a method that catches the true mean ninety five percent of the time. Any one interval either caught it or didn't.
Intervals for a proportion
Next, a proportion. The interval is p hat, plus or minus z, times the square root of p hat times one minus p hat, over n. This normal approximation is fair when n times p hat, and n times one minus p hat, are both at least five.
Worked example two. The new nesting cartons are shipping, and Rosa wants scuffs on fewer than five percent of them. Priya opens two hundred cartons, and six have a scuffed chair. P hat is three percent, and n times p hat is six, so the normal curve is fair. The standard error is the square root of point oh three times point nine seven, over two hundred: about one point two one percent. Times one point nine six: two point three six percent. So the interval runs from about point six four percent to five point three six percent.
Three percent looks fine, but the interval reaches past five. Two hundred cartons can't show scuffs are under five percent! How many would? For a margin of one percent, n equals z squared, times p times one minus p, over the margin squared: about one thousand one hundred eighteen cartons. For a mean, n is z times sigma over the margin, squared. To pin the slat mean within point oh three millimeters, with sigma point one: forty three slats. Half the margin always costs four times the sample!
Watch the small counts. One scuff in fifty cartons is two percent, and the normal formula gives minus one point nine percent to five point nine. A negative scuff rate! The approximation broke. The exact interval from software runs from about point oh five percent to ten point six. Bad: report a negative limit, or clip it at zero. Good: check n times p hat first, and use an exact or Wilson interval when it's small.
Intervals for a spread
Now the spread. For normal data, the variance interval uses chi-square with n minus one degrees of freedom. The lower limit is n minus one, times s squared, over the upper chi-square value. The upper limit is the same top, over the lower chi-square value. Take square roots for sigma. This interval isn't symmetric, and it leans hard on normal data, so check a normal probability plot first.
Worked example three: Dwayne's capability claim. Ten slats, s of point oh nine. The chi-square table with nine degrees of freedom, or the spreadsheet's right-tail chi-square inverse, gives nineteen point oh two three and two point seven oh. So sigma lies between about point oh six two and point one six four millimeters. For a C P of one point three three on the one millimeter spec, sigma must be at most point one two five. The upper limit is above that. Not shown yet!
So Priya measures thirty slats, while the control chart stays stable, and s comes out point oh nine again. With twenty nine degrees of freedom, the chi-square values are forty five point seven two and sixteen point oh five, and sigma lies between about point oh seven two and point one two one. Now the whole interval is under point one two five. Capability of at least one point three three is shown. Dwayne was right, just too early!
Prediction and tolerance intervals
Two cousins answer different questions. A prediction interval covers the next single slat: x bar, plus or minus t, times s, times the square root of one plus one over n. For Priya's ten slats: eighteen point eight three to nineteen point two five. A tolerance interval covers a stated share of all slats, with a stated confidence. For ninety nine percent of slats at ninety five percent confidence, a tolerance factor table gives about four point four four for n of ten: eighteen point six four to nineteen point four four, inside the spec. Same data, three questions, three widths!
Reading the result
So, how do you decide? Put the requirement next to the interval. If the whole interval meets it, it's shown. If the whole interval misses it, the problem is shown. If it straddles the line, the data can't tell yet, so collect more, using the sample-size formula. And check the conditions first: a stable process, random and independent samples, and normal data for the variance interval.
Common mistakes
Common mistakes. One: z with a small sample and an estimated sigma. Two: dividing by n instead of the square root of n, or not dividing at all. Three: the normal formula for a proportion with tiny counts. Four: a chi-square interval on skewed data. And five: an interval on an unstable process. With special causes, there's no single mean to estimate!
And misreadings. A confidence interval is not where individual slats fall. That's the tolerance interval's job, and none of these are specification limits. Two intervals that overlap a little can still differ, so compare groups with a proper test. And a narrow interval isn't automatically right: a gauge that reads high gives a precise, wrong answer.
Recap
Let's recap. Every interval is an estimate, plus or minus a critical value times a standard error. Means use z when sigma is known and t when it isn't. Proportions need n times p hat of at least five, or an exact interval. Variances use chi-square and need normal data. The confidence is in the method. Compare the whole interval to the requirement, then decide!
Check yourself
Now, check yourself. Priya pull-tests sixteen welds after a new contact-tip schedule. The average is fourteen fifty pounds-force, and s is forty. With fifteen degrees of freedom, t is two point one three one. What's the ninety five percent confidence interval for the mean? A: fourteen thirty point four to fourteen sixty nine point six. B: fourteen twenty eight point seven to fourteen seventy one point three. C: thirteen sixty four point seven to fifteen thirty five point three. Or D: fourteen forty four point seven to fourteen fifty five point three. Pause the video if you want to think about it.
The answer is B. The standard error is forty over the square root of sixteen, forty over four: ten. The margin is two point one three one times ten: twenty one point three. So, fourteen twenty eight point seven to fourteen seventy one point three. A uses z instead of t. C forgets to divide s by the square root of n. And D divides by n instead of its square root.
That's confidence intervals for means, proportions and variances. Questions? Ask Q-Bot right here in the Academy. And one for the road: how does a confidence interval answer, how are you doing? Somewhere between fine and great, with ninety five percent confidence!
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.