Check · Test yourselfPractice tests

Academy › Topic library › Going Deeper: Tests for Variances and Proportions

Q-BOT ACADEMY · FREE VIDEO LESSON · 13 MIN

Going Deeper: Tests for Variances and Proportions

In quality, spread is often the real enemy. A process can sit right on target and still make scrap, because it's too wide. And a lot of what we count is a yes or no: a chair rocks or it doesn't, a carton is scuffed or it isn't. So you need to test a standard deviation, and you need to test a proportion. The five steps are the same as always.

12:42 · Q-Bot · narrated, with worked example and a check-yourself question

In short

Chi-square for one variance: n minus one, times s squared, over sigma zero squared. F for two variances: the larger variance over the smaller. Both need normal data, so check first, or use Levene's test. One proportion: z with p zero in the standard error, and n p zero at least ten. Two proportions: z with the pooled rate. And always ask how big the difference is!

Check yourself

Ellen compares cracked slats from two suppliers. Supplier A: twelve cracked out of four hundred, three percent. Supplier B: four out of four hundred, one percent. The pooled rate is two percent, and the standard error is point oh oh nine nine. Which is right? A: z is about two point oh two, past one point nine six: the rates differ. B: z is about two point oh two, so supplier A's process is proven to cause the cracks. C: z is about two point oh two, so we accept the null. Or D: use an F test, because there are two suppliers.

Show the answer

The answer is A. Z equals point oh three minus point oh one, over point oh oh nine nine: about two point oh two. Two-sided, the cutoff is one point nine six, and the p-value is about point oh four three, so reject the null: the cracked-slat rates differ. Expected counts are eight per supplier, so the z test is fine. B claims a cause the test can't show. C accepts the null, which we never do, and it's the wrong decision here. And D uses a variance test on proportions. That's tests for variances and proportions. Questions? Ask Q-Bot right here in the Academy. And one for the road: why did the F test refuse to share a booth? It needed a lot more room for its variance!

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, Monday morning. Two questions land on Marcus's desk at once. Ellen's powder supplier says their new fine-grade powder sprays more evenly. Is the coating spread really smaller? And Dwayne's rocking check shows more wobbly chairs on second shift. Real, or just bad luck? Neither question is about an average. One is about spread, and one is about a percentage. Different questions, different tests!

Hey there, I'm Q-Bot. Welcome to the Q-Bot Academy. Today we're going deeper: tests for variances and proportions! We'll work the chi-square test for one variance, the F test for two variances, and the z tests for one and two proportions, with their formulas, their assumptions, and four Brindlewood examples. If hypothesis testing is new to you, start with the hypothesis testing video.

Why the math matters

Why does the math matter? In quality, spread is often the real enemy. A process can sit right on target and still make scrap, because it's too wide. And a lot of what we count is a yes or no: a chair rocks or it doesn't, a carton is scuffed or it isn't. So you need to test a standard deviation, and you need to test a proportion. The five steps are the same as always.

The chi-square test for one variance

First, the chi-square test for one variance. It compares a sample's spread to a known or claimed value, sigma zero. The formula: chi-square equals n minus one, times s squared, divided by sigma zero squared, with n minus one degrees of freedom. If the true spread equals sigma zero, this number averages about n minus one. Much bigger means the spread grew. Much smaller means it shrank. Bad: compare s to sigma zero directly. Good: compare the variances, s squared over sigma zero squared.

Worked example 1: the new powder

Worked example one. The coating line's history says sigma is point one two mils. Priya sprays twenty Harbor chair frames with the new powder, and gets s equals point oh eight five. We want to know if the spread is smaller, so it's a lower-tail test. Chi-square equals nineteen, times point oh eight five squared, over point one two squared. That's nineteen times point oh oh seven two two five, over point oh one four four: about nine point five three, with nineteen degrees of freedom.

Now the cutoff. A chi-square table, or the spreadsheet's chi-square inverse, gives ten point one one seven for the lower five percent with nineteen degrees of freedom. Nine point five three is below it, and the p-value is about point oh three seven. Reject the null: the new powder shows a smaller spread! The one-sided ninety five percent upper bound for sigma is about point one one seven mils: below point one two, but not by much. So it may be a big improvement, or just a small one. Ellen orders a longer trial before she switches.

The F test for two variances

Next, the F test, for two variances. It compares the spreads of two independent groups. The formula: F equals s one squared over s two squared, with n one minus one and n two minus one degrees of freedom. Put the larger variance on top, so F is at least one. Then, for a two-sided test at alpha point oh five, compare F to the upper two and a half percent point from an F table, or the spreadsheet's right-tail F inverse.

Worked example 2: the welding stations

Worked example two. Remember the two welding stations? Station two's standard deviation was seventy pounds of force on eight welds, and station one's was thirty five, on twelve welds. F equals seventy squared over thirty five squared: forty nine hundred over twelve twenty five, exactly four, with seven and eleven degrees of freedom. The two and a half percent cutoff is three point seven six. Four is past it, and the two-sided p-value is about point oh four.

So the spreads differ. That backs up the choice to use Welch's t test for those averages, not the pooled one. And it points Lou at station two's wire feed. Notice how big the ratio had to be. With small samples, a variance ratio of four is barely significant. F tests need a lot of data to see modest changes in spread. Bad: call two spreads equal because F wasn't significant on eight welds. Good: say you couldn't show a difference yet.

Assumptions: normality and Levene's test

Now, a warning. Chi-square and F tests for variances lean hard on normality, much harder than t tests do. Skewed data or a few outliers can fake a significant result. So check a normal probability plot first, and a control chart for stability. When the data aren't normal, or when you compare three or more groups, use Levene's test, which is much less sensitive to the shape.

The one-proportion z test

Now, proportions. First, the one-proportion z test. It compares a sample proportion, p hat, to a target, p zero. The formula: z equals p hat minus p zero, divided by the square root of p zero times one minus p zero, over n. Notice the standard error uses p zero, the null value, not p hat. The normal approximation works when n times p zero, and n times one minus p zero, are both at least ten. Otherwise, use the exact binomial test.

Worked example 3: scuffed cartons

Worked example three. Rosa wants scuffed cartons below five percent. Priya opened two hundred cartons and found six with a scuffed chair: three percent. Is that below five? It's a lower-tail test. The standard error is the square root of point oh five times point nine five, over two hundred: point oh one five four. Z equals point oh three minus point oh five, over point oh one five four: about minus one point three. The cutoff for a lower-tail test at point oh five is minus one point six four five.

Minus one point three doesn't reach it. The p-value is about point oh nine seven, and the exact binomial gives about point one two. Fail to reject. Three percent looks good, but two hundred cartons can't prove the true rate is under five yet. That isn't proof the rate is high, either! For an eighty percent chance of showing it, if the true rate is three percent, Priya needs about six hundred thirty cartons. She keeps counting.

The two-proportion z test

Next, the two-proportion z test, for two independent groups. First, pool the two samples: p bar equals x one plus x two, over n one plus n two. Then z equals p hat one minus p hat two, divided by the square root of p bar, times one minus p bar, times one over n one plus one over n two. Pool because the null says both rates are equal. Check that every expected count, n times p bar, is at least five.

Worked example 4: rocking by shift

Worked example four, Dwayne's rocking check. Out of fifteen hundred chairs from each shift, first shift had nine rockers, point six percent, and second shift had twenty one, one point four percent. The pooled rate is thirty over three thousand: one percent. The standard error is the square root of point oh one, times point nine nine, times two over fifteen hundred: point oh oh three six three. Z equals point oh oh eight over point oh oh three six three: about two point two oh.

Two-sided at point oh five, the cutoff is one point nine six. Two point two oh is past it, and the p-value is about point oh two eight. Reject the null: the shifts' rocking rates differ! For a confidence interval on the difference, use the unpooled standard error: about point one to one and a half percentage points. Dwayne walks the line on second shift and finds the glide press set by feel. A simple fixture fixes it. The test showed a difference. The walk found the cause.

In a spreadsheet

In a spreadsheet, the chi-square inverse and right-tail chi-square inverse give the variance cutoffs, the right-tail F inverse gives the F cutoff, and the F test function returns a two-sided p-value for two ranges directly. For proportions, the standard normal inverse gives one point six four five and one point nine six, the standard normal distribution gives the p-value, and the binomial distribution gives the exact test. Two proportions can also be run as a two-by-two chi-square table: you get the same p-value, since chi-square equals z squared. That table gets its own video.

Reading the result

So how do you read the result and decide? Compare the statistic to the cutoff, or the p-value to alpha. Reject, and the spread or rate differs. Fail to reject, and you haven't shown a difference yet. Then ask how big, and what it costs. 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: putting standard deviations into the F ratio, instead of variances. Two: using p hat in the one-proportion standard error, instead of p zero. Three: the normal approximation with too few defects. Ten parts with one bad isn't enough. Four: running a variance test on skewed data without checking. Five: testing two proportions from the same items, like before and after on the same chairs, as if they were independent. That needs a paired method.

And misreadings. Significant doesn't mean important: check the size of the change against the cost. Not significant doesn't mean equal: Priya's cartons just need more data. A difference between shifts doesn't prove what caused it. Go and look, like Dwayne did. And a variance test from an unstable process means nothing: special causes first.

Recap

Let's recap. Chi-square for one variance: n minus one, times s squared, over sigma zero squared. F for two variances: the larger variance over the smaller. Both need normal data, so check first, or use Levene's test. One proportion: z with p zero in the standard error, and n p zero at least ten. Two proportions: z with the pooled rate. And always ask how big the difference is!

Check yourself

Now, check yourself. Ellen compares cracked slats from two suppliers. Supplier A: twelve cracked out of four hundred, three percent. Supplier B: four out of four hundred, one percent. The pooled rate is two percent, and the standard error is point oh oh nine nine. Which is right? A: z is about two point oh two, past one point nine six: the rates differ. B: z is about two point oh two, so supplier A's process is proven to cause the cracks. C: z is about two point oh two, so we accept the null. Or D: use an F test, because there are two suppliers. Pause the video if you want to think about it.

The answer is A. Z equals point oh three minus point oh one, over point oh oh nine nine: about two point oh two. Two-sided, the cutoff is one point nine six, and the p-value is about point oh four three, so reject the null: the cracked-slat rates differ. Expected counts are eight per supplier, so the z test is fine. B claims a cause the test can't show. C accepts the null, which we never do, and it's the wrong decision here. And D uses a variance test on proportions.

That's tests for variances and proportions. Questions? Ask Q-Bot right here in the Academy. And one for the road: why did the F test refuse to share a booth? It needed a lot more room for its variance!

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.