Misreading intervals and power
Confidence intervals and power are misread as often as p-values. Work through the last seven of Greenland's 25 misinterpretations, with the arithmetic that exposes each one.
What runs in CodeSplash
- Two-sample t-test (Welch / Student, or z test) Verified in Python and R
- Power analysis — t tests Verified in Python and R
You will be able to
- Say what the 95% in a confidence interval refers to
- Compare two estimates by testing their difference, not by overlapping intervals
- Explain why power doesn't give the chance that a null result is wrong
Bet on the next study
PredictPredict first
You have a 95% confidence interval. A new study of the same size measures the same thing. How often does its estimate land inside your interval?
Reveal
About 83%. Your interval and the new estimate both carry error, and the 95% refers to neither of them. The difference between two estimates with equal standard errors has a standard error of times one, so the chance is . Place your own bets below.
BExplorable · The confidence interval bet
If you repeat the study, how often does the new mean land inside today's 95% interval?
What share of replication means will fall inside this interval?
Confidence level
Commit your prediction above to see the result
Make your prediction to see the result.
What the 95% refers to
ExploreDraw many samples, and count how many intervals catch the true value. The 95% belongs to this procedure. Any one interval either contains the truth or doesn't, and you can't tell which.
AExplorable · The confidence-interval dance
What does it mean for an interval to be 95% confident?
Out of these studies' intervals, how many will miss the true mean?
Confidence level
Population
Interval
The z shortcut uses 1.96 with the sample SD — fine for large n only.
96 of 100 contain μ · 4 miss
Commit your prediction above to see the result
Make your prediction to see the result.
Read one interval as the values most compatible with the data, given the model. For a probability about the value, use a Bayesian credible interval and state its prior.
Near the edge
CheckpointA value barely outside the interval and a value barely inside it are about equally compatible with the data. The edge exists only because someone chose 95%. And all of it assumes the model is right.
Check yourself
A 95% CI for a difference runs from 2.1 to 8.3. A colleague says the data rule out a difference of 2. What do you say?
Show the answer
Answer: b
Under the model, 2 gets a little below 0.05. That's weak evidence against it, and nowhere near a refutation. A compatibility curve shows this directly.
Overlap
PredictPredict first
Two independent estimates have 95% intervals and . The intervals overlap. Test the difference between them. Is it significant at 0.05?
Reveal
Yes. Their estimates are 3 and 12, with standard errors 1 and 4. So , and . The correct standard error for a difference is smaller than the sum of the two, so intervals can overlap and still differ. Non-overlap does imply , but overlap doesn't imply the reverse.
from math import sqrt
from scipy import stats
est1, se1, est2, se2 = 3, 1, 12, 4
z = (est2 - est1) / sqrt(se1**2 + se2**2)
print(z, 2 * stats.norm.sf(abs(z)))est1 <- 3; se1 <- 1; est2 <- 12; se2 <- 4
z <- (est2 - est1) / sqrt(se1^2 + se2^2)
c(z = z, p = 2 * pnorm(-abs(z)))Width is precision
CheckpointAn interval that excludes zero can look "more precise" than one that doesn't. Precision is the width, and nothing else.
Check yourself
Study A: 95% CI from 5 to 35. Study B: 95% CI from −5 to 10. Which is more precise?
Show the answer
Answer: b
A is 30 wide and B is 15. Whether an interval includes zero depends on where it's centered as well as on how wide it is.
Power isn't your error rate
ExploreChange the share of studies with a real effect and the power, then read each quadrant. Power is a long-run rate over many studies, computed for one assumed effect. After your study, you're in one of the quadrants, and power doesn't say which.
BExplorable · Truth and decision: the four quadrants
Out of many studies, how many significant results are real?
Of the significant results, what share will be false alarms?
- Real effect, significant: 50
- No effect, significant (false alarm): 45
- Real effect, missed: 50
- No effect, not significant: 855
Commit your prediction above to see the result
Make your prediction to see the result.
If the null is false and you "accept" it, you're wrong for certain. If it's true, you're right for certain. Ten percent describes neither case.
High power, closer to the alternative
CheckpointA non-significant result that favors the alternative
An estimate of with standard error gives against zero.
- The test has 90% power at an effect of .
- Test that effect: , so .
- The p-value against the alternative is the larger one, so the data are more compatible with than with .
Try this step yourself, then reveal it
Yet the result is "not significant, with 90% power at that effect".
Check yourself
Change the estimate to , with standard error . What is the two-sided p-value against zero? Use three decimals.
Show the answer
Answer: 0.0357
gives . It's significant at 0.05, and gets , so the alternative is still the more compatible of the two.
Check yourself
Your finished study has . What should you use to say what it could and couldn't detect?
Show the answer
Answer: c
Observed power restates the p-value. The interval shows which effects remain compatible.
On a real card
In the appRun a t test and look at the interval on its card. Say in one sentence which differences are compatible with the data. Then open a power analysis for a smallest effect you care about, and see what sample size it asks for.
Recap
Recap- The 95% describes the procedure, over many samples. It isn't the chance for this interval, or the share of future estimates inside it.
- To compare two estimates, estimate their difference. Overlap can't settle it.
- Power is a planning number at one assumed effect. It doesn't give the chance that your finished study is wrong.
Concepts in this lesson