Planning Sample Sizes and Power
Decide how many parts to test before you start. For an estimate, solve the margin of error for ; for a test that has to catch a shift , make that shift span standard errors. Either way grows like , so halving the effect you care about takes four times the parts.
What the symbols mean
- Margin of error
The half-width you can live with.
- Normal critical value
1.96 for 95% confidence.
What the symbols mean
- Power
The chance the test catches a real shift of size δ.
- Shift
The smallest change in the mean worth detecting.
- Standard normal CDF
Area to the left under the standard normal curve.
What the symbols mean
- Significance point
1.645 for a one-sided test at α = 0.05; use the two-sided value, 1.96, for a two-sided test.
- Power point
1.282 for 90% power, 0.842 for 80%, 1.645 for 95%.
Explanation
Sample-size planning is simply deciding, before you collect any data, how many parts you need so the study can actually answer your question. There are two versions. For an estimate, : how noisy the parts are (), how sure you want to be () and how close you need to get (). For a test, the same shape with (the false-alarm and missed-shift risks you'll accept) and (the smallest shift worth catching) in place of . Both are the standard-error formula solved for , so this is old material put to new use.
Plan first. Every interval and test in this course sharpens as grows; the question is how sharp it has to be. Too few parts and a real problem slips through; too many and the study burns a week of production.
For an estimate. The margin of error of a mean is , so , always rounded up. σ comes from past data or a pilot run; if it's a guess, be generous. For a defect rate the same algebra gives (proportion intervals).
For a test: where the power formula comes from. Test against with σ known, rejecting when . If the mean has really moved to , then and
For power the argument must equal , so . In pictures: two bell curves for , one centered at and one at . The cutoff sits standard errors above the first and below the second, so the shift has to span standard errors.
Two-sided tests use in place of ; the far tail adds almost nothing to the power.
Trade-offs:
- : halving the detectable shift quadruples .
- : a steadier process or a better gauge cuts directly. Since (measurement error), fixing a noisy gauge can beat measuring more parts.
- A smaller α or more power both raise : going from 80% to 95% power multiplies by about 1.75 for a one-sided test at α = 0.05.
- When σ will be estimated by (a t test), the z formula runs a little low: add two or three parts.
- Comparing two processes with each, , so each needs (comparing processes).
"No difference found" needs power. A study with 30% power that finds nothing has shown almost nothing. Before accepting "the new supplier is no different", ask what shift the test could have detected.
Same idea elsewhere: the number of runs for a Monte Carlo estimate, (Monte Carlo tolerancing), and the α and β picture in hypotheses and errors.
See it
Worked examples
A welding engineer wants the mean tensile strength of a new joint within MPa at 95% confidence. Past joints have MPa. How many joints should be tested?
- 1
.
A filler targets 500 g with g. How many jars does a one-sided test at need to catch a 1 g overfill with power 0.90 (, )? What's the power with that ?
- 1
, so 35 jars.
Practice
Type your answer and check it. Solve them all to complete the lesson.
A test lab wants the mean resistance of a reel of 4.7 kΩ resistors within Ω at 95% confidence. Past reels have Ω. How many resistors should it measure?
A relief valve should open at 150 kPa ( kPa). A one-sided test of against uses 16 valves at . What's the power if the mean has drifted to 153 kPa? Give 3 decimal places.
A power supply's output must not sag: a one-sided test should catch a 0.5 V drop in the mean ( V) with and power 0.95 (, ). How many units?
A test plan needs 40 parts to detect a 2 µm shift. How many parts would it need to detect a 1 µm shift with the same σ, α and power?
A connector line runs about 2% defective. To estimate the defect rate within percentage points at 95% confidence, how many connectors must be inspected?
Two filling heads will be compared with the same number of jars from each ( g per head). How many jars per head are needed to detect a 1 g difference in means with a two-sided test at and power 0.90 (, )?
The jar test from the example uses ( g, one-sided ). What's its power if the overfill is only 0.5 g? Give 3 decimal places.
The hardest one here. Get it, and you've got this lesson.
Each month a plant checks a process for a 1.0 µm mean shift (one-sided , power 0.90, , ). Part-to-part variation is µm and the current gauge adds µm. A new gauge with µm costs 3,000 dollars, and measuring a part costs 40 dollars. Over 12 monthly studies, what is the total cost (in dollars) of the cheaper option?
Where it's used
Qualification plans (how many parts in a first-article inspection), reliability demonstration tests, trials of new production settings and clinical device studies are all sized this way before the first measurement. Customers and regulators routinely ask for the power calculation behind a "no difference found" claim, because a study too small to detect a meaningful shift can't vouch for anything.