01 / 21

Sample Size
& Power

Learn how sample size drives the reliability of business decisions and how statistical power protects you from missing real effects.

Business Analytics

What Is a Sample?

In business analytics, we rarely have access to the entire population: every customer, every transaction, or every product unit. Instead, we collect a sample: a smaller subset we can actually measure.

Population Analyze Draw Conclusions
Sample (\( n \))

What Is Statistical Power?

Statistical power is the probability that your test correctly detects a real effect when one exists. Formally, power equals \( 1 - \beta \), where \( \beta \) is the probability of a Type II error (failing to reject a false null hypothesis).

High Power
You are likely to detect a real difference: your test is sensitive enough.
Low Power
You risk missing a real effect: inconclusive results, wasted resources.

Why Sample Size & Power Matter

Every business decision backed by data depends on having enough data to trust the conclusion. Too small a sample leads to unreliable results; too large wastes time and money.

1
A/B testing: choosing the right sample size ensures you can detect a meaningful lift in conversion rates.
2
Quality control: too few inspections may miss defective batches, costing the company in recalls.
3
Market research: surveying enough customers lets you generalize findings to the whole market.

The Four Levers of Power

Power is not just about sample size. Four factors interact to determine whether your test will detect a real effect:

\( n \)
Sample size: more data increases power.
\( \alpha \)
Significance level: raising \( \alpha \) increases power but raises Type I error risk.
\( d \)
Effect size: bigger real differences are easier to detect.
\( \sigma \)
Variability: less noise in the data increases power.

The Sample Size Formula

For estimating a population mean with a desired margin of error \( E \), the required sample size is:

\( z \)
Critical value from the standard normal distribution (e.g., 1.96 for 95% confidence).
\( \sigma \)
Population standard deviation (estimated from prior data or a pilot study).
\( E \)
Desired margin of error: how precise you need the estimate to be.

Visualizing Power

Power is the green shaded area under the alternative hypothesis distribution that falls beyond the critical value. As \( n \) grows, distributions narrow and the overlap shrinks.

Critical value
\( H_0 \)
\( H_1 \)
Power
\( = 1 - \beta \)
\( \beta \)
Test Statistic

Type I vs Type II Errors

Understanding errors is essential. Power directly addresses Type II error, but it trades off with Type I error.

Type I (\( \alpha \)) Type II (\( \beta \))
What happens Reject \( H_0 \) when it is true Fail to reject \( H_0 \) when it is false
Also called False positive False negative
Business example Launching a campaign that has no real impact Missing a campaign that would have worked
Controlled by Choosing \( \alpha \) (e.g., 0.05) Increasing power (\( 1 - \beta \))

Understanding Effect Size

Effect size measures how large the real difference is, standardized by variability. Cohen's \( d \) is the most common measure:

Small
\( d \approx 0.2 \): subtle differences, need large \( n \).
Medium
\( d \approx 0.5 \): noticeable differences, moderate \( n \).
Large
\( d \approx 0.8 \): obvious differences, smaller \( n \) suffices.

How \( n \) Drives Power

As sample size increases, the sampling distribution becomes narrower. This means the overlap between \( H_0 \) and \( H_1 \) shrinks, and power rises.

0.0 0.2 0.4 0.6 0.8 1.0 0.80 0 20 40 60 80 100
Sample Size (\( n \))
Power
\( n \approx 39 \)

How to Determine Sample Size

1
Define your goal: what effect or difference do you want to detect?
2
Choose \( \alpha \): the significance level, typically \( 0.05 \).
3
Set desired power: usually \( 0.80 \) or \( 0.90 \).
4
Estimate \( \sigma \): from pilot data, prior studies, or industry benchmarks.
5
Plug into the formula: \( n = \left(\frac{z \cdot \sigma}{E}\right)^{2} \) and round up to the next whole number.

Example 1: Customer Survey

A retailer wants to estimate average customer satisfaction within \( E = 2 \) points at 95% confidence. Past data shows \( \sigma = 12 \).

1
Identify values: \( z = 1.96 \), \( \sigma = 12 \), \( E = 2 \).
2
Apply formula: \( n = \left(\frac{1.96 \times 12}{2}\right)^{2} = \left(\frac{23.52}{2}\right)^{2} = (11.76)^{2} \).
3
Calculate: \( n = 138.30 \).
4
Round up: \( n = 139 \) customers needed.

Example 2: A/B Test

An e-commerce team wants to detect a 5-percentage-point lift in conversion (from 10% to 15%). They want 80% power at \( \alpha = 0.05 \) (two-tailed).

1
Values: \( z_{\alpha/2} = 1.96 \), \( z_{\beta} = 0.84 \), \( p_1 = 0.10 \), \( p_2 = 0.15 \).
2
Numerator: \( (1.96 + 0.84)^{2} \times [0.10(0.90) + 0.15(0.85)] = 7.84 \times 0.2175 = 1.7052 \).
3
Denominator: \( (0.15 - 0.10)^{2} = (0.05)^{2} = 0.0025 \).
4
Result: \( n \approx 1.7052 / 0.0025 = 682.08 \). Rounding up gives \( n = 683 \) per group, so 1,366 total visitors.

Example 3: Tighter Precision

What happens if the retailer from Example 1 wants a tighter margin of error: \( E = 1 \) instead of \( E = 2 \)?

\( E = 2 \)
\( n = \left(\frac{1.96 \times 12}{2}\right)^{2} = 139 \)
\( E = 1 \)
\( n = \left(\frac{1.96 \times 12}{1}\right)^{2} = 554 \)

Common Mistakes

✕ Ignoring Effect Size
Using a huge sample to detect a trivially small effect wastes resources and produces statistically significant but practically meaningless results.
✕ Rounding Down
If the formula gives \( n = 384.2 \), you need 385, not 384. Rounding down reduces your actual power below the target.
✕ Post-Hoc Power
Computing power after collecting data and getting a non-significant result is circular reasoning. Power analysis should be done before data collection.

Summary: Key Relationships

If you increase... Effect on Power Effect on Required \( n \)
Sample size \( n \) ↑ Increases —
Significance \( \alpha \) ↑ Increases ↓ Decreases
Effect size \( d \) ↑ Increases ↓ Decreases
Variability \( \sigma \) ↓ Decreases ↑ Increases
Margin of error \( E \) — ↓ Decreases

Question 1 of 5

Statistical power is defined as the probability of:

Question 2 of 5

Using \( n = \left(\frac{z \cdot \sigma}{E}\right)^{2} \) with \( z = 1.96 \), \( \sigma = 10 \), and \( E = 2 \), what is the minimum sample size?

Question 3 of 5

Which of the following will increase the power of a hypothesis test?

Question 4 of 5

A researcher halves the margin of error from \( E = 4 \) to \( E = 2 \) while keeping everything else constant. How does the required sample size change?

Question 5 of 5

A Type II error in an A/B test means: