STAT 200 · Statistics for Economics

Errors, Power and Sample Size

Every test can be wrong in two ways, and power tells you how likely a study is to catch a real effect, which decides how much data to gather.

Key takeaways

  • A Type I error is a false alarm: rejecting a null that is true. Its chance is α, the significance level.
  • A Type II error is a miss: failing to reject a null that is false. Its chance is called β.
  • Power is 1 − β, the chance a test catches an effect that is really there. Many researchers aim for 80%.
  • Power rises with a bigger sample, a bigger true effect, a higher α and less noise in the data.
  • You can plan the sample size in advance, before spending money on data collection.

Think about a smoke alarm. It can go wrong in two ways. It can blare when you only toasted bread: a false alarm. Or it can stay silent while a real fire spreads: a miss. Nobody wants either one. But you cannot drive both to zero. Make the alarm more sensitive and you get more false alarms. Make it calmer and you risk more misses.

A hypothesis test is a smoke alarm for patterns in data. This lesson names the two ways it can fail, shows how to measure its power to catch real effects, and answers a question every researcher faces before starting: how much data is enough?

Two ways to be wrong

Remember the courtroom from the lesson on hypothesis testing. A jury can convict an innocent person, or let a guilty person walk. Tests have the same two errors.

  • Type I error: you reject the null, but the null was true. A false alarm. Its probability is α, which you choose.
  • Type II error: you fail to reject the null, but the null was false. A miss. Its probability is β.

There are also two ways to be right: correctly keeping a true null, and correctly rejecting a false one. The second of these is the reason we run studies at all.

Four outcomes of a hypothesis test
Reject, null false Correct. A real effect is found. This chance is the power. Reject, null true Type I error. A false alarm, with chance α. Keep, null false Type II error. A real effect is missed, with chance β. Keep, null true Correct. Nothing was there, and nothing was claimed. Reject, null false Correct. A real effect is found. This chance is the power. Reject, null true Type I error. A false alarm, with chance α. Keep, null false Type II error. A real effect is missed, with chance β. Keep, null true Correct. Nothing was there, and nothing was claimed.

The columns show what is really true. The rows show what you decided.

You choose α before the data arrive. You do not choose β directly. It depends on how big the true effect is, how noisy the data are and how many observations you have. That is where power comes in.

What power means

Power is the probability that your test rejects the null when the null is false. In symbols, power = 1 − β. If power is 80%, then when an effect of the size you care about is really there, your study will catch it 8 times in 10 and miss it 2 times in 10.

Low power is a quiet problem in research. A study with 30% power will usually fail to find a real effect. Worse, "we found nothing" gets read as "there is nothing," which is exactly the mistake we flagged in the earlier lesson. And the few low-power studies that do find something tend to overstate the effect size, because only unusually big gaps cleared the bar.

Worked example: Priya's sign again

Return to Priya's bakery. Her muffins sell 200 a day on average, with a standard deviation of 30. She wants to test whether the new sign raises sales. Because she only cares about an increase, she uses a one-sided test at α = 5%. The one-sided cutoff is z = 1.645.

Suppose she watches n = 36 days. The standard error is 30 ÷ √36 = 5. The test rejects when the sample average is above:

cutoff = 200 + 1.645 × 5 = 200 + 8.225 = 208.225

Now suppose the sign really works and the true average is 210. What is the chance her 36-day average lands above 208.225? If the true average is 210, sample averages are centered at 210 with a standard error of 5. Then:

z = (208.225 − 210) ÷ 5 = −0.355
chance of landing above the cutoff ≈ 0.64

So the power is about 64%, and β is about 36%. More than a third of the time, even though the sign works, Priya's test would fail to notice. A 10-muffin boost sounds nice, but 36 days is not enough to reliably see it.

Power climbs as the sample grows
Power (chance of catching the effect) 20 40 60 80 100 Power 80% target 36 days: 64% 56 days: 80% Days observed (in tens) Power (chance of catching the effect) 20 40 60 80 100 Power 80% target 36 days: 64% 56 days: 80% Days observed (in tens)

The graph assumes a true gain of 10 muffins a day, a standard deviation of 30, and a one-sided test at 5%. At 100 days, the power is about 95%.

What moves power

Four things push power up or down. Each one has an everyday meaning.

  1. Sample size n. More data shrinks the standard error (σ ÷ √n), so real gaps stand out from the noise. This is the one you control most easily.
  2. Effect size. A big true effect is easy to spot, and a tiny one needs a lot of data. A 20-muffin boost would show up much more easily than a 2-muffin boost.
  3. Noise σ. Steadier data are easier to read. If daily sales swung only by 10 instead of 30, the same gap would stand out.
  4. Significance level α. A looser α, like 10%, lowers the bar to reject and raises power, but it also raises false alarms. This is the smoke alarm trade-off.

Notice the square root in the standard error. To cut the standard error in half, you need four times as much data, not twice. That is why precision gets expensive fast. The lesson on precision explained the same square-root rule.

Planning the sample size

Because power depends on n, you can work backward. Pick the effect you want to catch, the noise level, your α, and a power target, then solve for n. For a one-sided test of one mean, the planning formula is:

Sample size for a one-sided test of one mean
n = (z(α) + z(β))² × σ² ÷ Δ² n = Sample size How many observations to collect (z(α) + z(β))² × σ² = Noise and risk Bigger when you want less risk or have noisier data Δ² = Effect squared The size of the difference you want to catch, squared n = (z(α) + z(β))² × σ² ÷ Δ² n = Sample size How many observations to collect (z(α) + z(β))² × σ² = Noise and risk Bigger when you want less risk or have noisier data Δ² = Effect squared The size of the difference you want to catch, squared

z for α = 5% one-sided is 1.645. z for 80% power is 0.842.

For Priya, who wants to detect a gain of Δ = 10 with σ = 30, at α = 5% (one-sided) and 80% power:

n = (1.645 + 0.842)² × 30² ÷ 10²
  = (2.487)² × 900 ÷ 100
  = 6.185 × 9
  ≈ 55.7

Round up to 56 days. Check it against the graph: at 56 days, power sits right at 80%. If Priya wants to catch a smaller gain of 5 muffins, then Δ² is 25 instead of 100, so she needs four times as many days, about 223. Halving the effect quadruples the data.

(For a two-sided test, replace 1.645 with 1.96. Real studies often use software, and the formulas change a bit for two groups or for percentages. The logic is the same.)

Which error costs more?

The two errors are rarely equal in cost, and good analysts think about that before they pick α.

Imagine a town council deciding whether to fund a new job-training program. Suppose the program costs a lot and the null says it has no effect. A Type I error means funding a program that does nothing, wasting public money. A Type II error means dropping a program that would have helped real families. Which is worse? It depends on the price tag, the size of the possible benefit and who bears the loss. A council that fears waste might demand α = 1%. A council that fears missing out on a cheap, low-risk benefit might accept α = 10%.

Medicine shows the same trade-off. A screening test for a serious but treatable illness will tolerate false alarms, because a miss can cost a life, and a follow-up test can clear up a false alarm. A test that leads straight to risky surgery should be much stricter. There is no single right α. There is only a sensible choice for the stakes, made in the open before the data arrive.

This is also why economists are wary of the lone phrase "significant at 5%." A stricter rule lowers false alarms but raises misses, unless you also gather more data. Money and time are the real limits. When data are costly, you are really choosing how to split a fixed budget of risk between the two errors.

Choosing the effect you care about

One part of planning often trips up beginners: what value of Δ should you plug in? The answer is not "the effect I hope for." It is the smallest effect that would matter in practice. Ask a plain question first. For Priya, would 2 extra muffins a day justify the cost of the sign? Probably not. Would 10? Likely yes. So she plans her study to catch gains of 10 or more, and she accepts that smaller gains may slip by.

If the cost of the sign is known, the break-even gain can be worked out. Suppose each muffin earns 1.50 dollars of profit and the sign costs 15 dollars a day in rent and upkeep. Then the break-even gain is 15 ÷ 1.50 = 10 muffins a day. Any smaller gain loses money. That gives a firm target: the study should have high power to detect 10. A gain of 3 muffins would be statistically detectable in a huge study but would still not pay for itself.

Planning this way keeps a study honest. You decide the size of effect that matters, the risks you will accept and the data you will need. Only then do you look at the numbers, and no one can accuse you of moving the goalposts.

A common mistake: "no significant result" from a tiny study

Suppose a city tests a new bus lane with only 8 days of data and finds no significant change in commute time. A news story says, "Bus lane makes no difference." Look at what is missing. With 8 observations the power was probably low, so even a real saving of several minutes would likely go undetected.

The honest line is: "This study was too small to tell." Before trusting a null result, ask what power the study had to detect a difference that would matter. A well-powered study that finds nothing is real evidence of a small effect. A weak study that finds nothing is mostly silence.

The opposite mistake also happens. An enormous sample can make a trivial difference "significant," as we saw in the lesson on p-values. Planning power is about choosing a sample that can detect the smallest effect worth caring about, and no more.

Words to know

Type I error rejecting a true null hypothesis, a false alarm, with probability α.

Type II error failing to reject a false null hypothesis, a miss, with probability β.

Power the probability of rejecting a false null, equal to 1 − β.

Effect size the size of the true difference the study hopes to detect.

Sample size the number of observations collected, usually written n.

Significance level (α) the false alarm rate chosen before the test.

Planning formula a rule that solves for the n needed to reach a target power.

Check yourself

  1. In plain words, what is a Type I error? A Type II error?
  2. If a test has β = 0.25, what is its power?
  3. A test uses a standard deviation of 20 and n = 25. What is the standard error? What happens to it if n rises to 100?
  4. Name two ways to raise a test's power, and one cost of each.
  5. Use the planning formula to find n for a one-sided test at 5% with 80% power, σ = 10 and a gap to detect of Δ = 5. Use (1.645 + 0.842)² ≈ 6.19.
  6. A study with very low power finds no significant effect. Why is it wrong to conclude there is no effect?
Show the answers
  1. A Type I error rejects a true null (a false alarm), and a Type II error fails to reject a false null (a miss).
  2. Power = 1 − β = 1 − 0.25 = 0.75, or 75%.
  3. SE = 20 ÷ √25 = 20 ÷ 5 = 4; at n = 100 it is 20 ÷ 10 = 2, half as big, because quadrupling n halves the standard error.
  4. A bigger sample raises power but costs more time and money; a looser α raises power but brings more false alarms.
  5. n = 6.19 × 10² ÷ 5² = 6.19 × 100 ÷ 25 = 6.19 × 4 = 24.76, so round up to 25.
  6. With low power, a real effect would usually be missed, so "not significant" is weak evidence and mostly says the study was too small to tell.

A free self-study program written for 4Economics with AI writing tools and not reviewed line by line by a person. It is not an accredited degree and awards no credit. Check anything you rely on against a textbook or primary source. Report an error.

In this unit: Inference

  1. Populations, Samples and Sampling BiasLearn how a small sample can speak for a large group, which sampling methods work, and how bias quietly ruins big surveys.10 min
  2. Sampling Distributions and the Central Limit TheoremSee how sample averages vary from draw to draw, why they form a bell shape, and how the standard error measures their wobble.11 min
  3. Estimators: Bias and PrecisionJudge the recipes that turn samples into guesses by their bias, their spread and their total error, with worked examples.10 min
  4. Confidence Intervals for Means and ProportionsBuild a range around an estimate, read what 95% confidence really means, and work out how large a sample you need.10 min
  5. The Logic of Hypothesis TestingHypothesis testing asks whether a result is too surprising to blame on luck alone, and this lesson shows the steps.11 min
  6. t Tests for One and Two MeansWhen you must estimate the spread from a small sample, the t test compares one average to a target or two averages to each other.10 min
  7. p-Values, Significance and Common MistakesA p-value measures how surprising your data are if the null is true, and it is misread more often than almost any number in science.11 min
  8. Errors, Power and Sample SizeEvery test can be wrong in two ways, and power tells you how likely a study is to catch a real effect, which decides how much data to gather.10 min
  9. Chi-Square Tests for CategoriesChi-square tests compare counts in categories with what you would expect, to check a pattern or whether two traits are linked.10 min
  10. Analysis of Variance in Plain EnglishANOVA compares three or more group averages at once by asking whether groups differ more than the usual wobble inside each group.11 min

In the news