Sub topic 9
How Much Data Is Enough: Sample Size and Power
Assume you know basic Lean Six Sigma terms, descriptive statistics, and the difference between a process input X and an output Y. This chapter assumes you are verifying a suspected cause with data, not yet changing the process.
Collecting data is a balance. Too little data may hide a real effect. Too much data wastes time and may detect a difference that has no practical importance. Sample size planning helps you choose a reasonable amount before collecting data.
The four inputs to a sample size decision
A sample size calculation usually needs four inputs:
- The effect size is the smallest difference that matters to the business. For example, a reduction of 2 minutes in cycle time may be practically important.
- The significance level, called alpha, is the probability of a false positive. A common choice is 0.05.
- Statistical power is the probability of detecting the chosen effect if it is real. A common target is 0.80 or 0.90.
- Variability describes how much the measured output changes naturally. Standard deviation is a common measure of variability.
Power and beta are related:
- Power = 1 - beta.
- Beta is the probability of a false negative: failing to detect an effect that is real.
The effect size must come from process knowledge, customer requirements, financial impact, or a capability goal. Do not choose it only because it produces a convenient sample size.
| Planning choice | What it controls | Common example |
|---|---|---|
| Effect size | Smallest difference worth detecting | 2 minutes |
| Alpha | False-positive risk | 0.05 |
| Power | Detection probability | 0.80 |
| Standard deviation | Expected process variation | 3 minutes |
How the choices affect sample size
Sample size increases when:
- The effect you want to detect is smaller.
- The process has more variation.
- You require higher power.
- You choose a smaller alpha.
- You compare more groups or analyze important subgroups.
For a two-group comparison, balanced groups are usually efficient. If one group has many more observations than the other, the extra observations provide less additional information.
Plan for unusable records, missing measurements, and exclusions. If the calculation requires 64 usable records per group and you expect 10% loss, plan for about 72 records per group:
- Required records = 64.
- Expected usable fraction = 0.90.
- Planned records = 64 / 0.90 = 71.1, rounded up to 72.
A power calculation in Python
This example plans a two-sided comparison of two independent means. It assumes a standard deviation of 3 minutes, a practically important difference of 2 minutes, alpha of 0.05, and power of 0.80.
from statsmodels.stats.power import TTestIndPower
effect_size = 2 / 3 # difference / standard deviation
analysis = TTestIndPower()
result = analysis.solve_power(
effect_size=effect_size,
alpha=0.05,
power=0.80,
alternative="two-sided",
)
print(f"Required observations per group: {result:.0f}")
print(f"Total required observations: {2 * result:.0f}")The standardized effect size is the expected difference divided by the standard deviation. The calculation gives a planning estimate, not a guarantee. Check the result against the actual design, sampling method, and assumptions.
Minimum detectable effect and stopping decisions
Sometimes the available sample size is fixed. In that case, calculate the minimum detectable effect instead of pretending the study has a chosen power. A study with too few observations may still describe the process, but a non-significant result may mean either “no meaningful cause effect” or “not enough information.”
Do not repeatedly check the p-value and stop as soon as it crosses 0.05. That practice changes the false-positive risk. Set the sample size, stopping rule, alpha, and primary comparison before reviewing the final result.
If the suspected cause may affect only one shift, product type, or machine, include enough observations in each important subgroup. A large overall sample cannot compensate for an almost empty subgroup.
Interpreting the result
A sample size plan supports a fair test of the hypothesis. It does not prove that the suspected cause is correct. After collection, inspect the data, verify assumptions, report the estimated effect with uncertainty, and interpret the p-value together with practical importance.
Exercise
A team expects a 1-minute difference, but the process standard deviation is 4 minutes. They want 90% power instead of 80%. What should they expect about the required sample size?
Show answer
It will be larger. The smaller effect relative to variation and the higher power requirement both increase the required sample size.