Proportions and chi-square tests
Testing defect rates, comparing two proportions, and chi-square tests for tables of counts.
When data are pass/fail or counts in categories, you compare proportions instead of means.
Tests for proportions
- 1-proportion test: is the defective rate different from a target (for example 1%)? Use the exact binomial test for small counts.
- 2-proportion test: is line A's defective rate different from line B's? For small counts use Fisher's exact test.
- Poisson rate tests: compare defects per unit or per hour.
Chi-square tests
- Test of independence (association): are two categorical variables related? Example: is defect type related to shift? Arrange the counts in a table; the test compares observed counts with those expected if there were no relationship.
- Goodness of fit: do counts match expected proportions (for example, equal defects across four cavities)?
- Rule of thumb: expected counts should be at least 5 in most cells; otherwise combine categories or use an exact test.
- McNemar's test compares paired pass/fail results (two inspectors on the same parts).
Sample sizes are large
Detecting a change from 2% to 1% defective with 80% power needs roughly 2,300 units per group. This is why measuring a characteristic (variables data) is so much more efficient than counting defectives.
Questions and answers
How do I show a defect rate is below 0.1%?
With zero defectives found, you need about 3,000 units to be 95% confident the rate is below 0.1% (the "rule of three": upper bound ).
Can I use a chi-square test on percentages?
No. Use the actual counts. Percentages hide the sample size.
