What "95% confidence" is a promise about — and why one non-significant study proves nothing
By the end of this module you will be able to:
In Step 2 you will draw 100 samples from a population whose mean you know is exactly 50. Each sample produces its own 95% confidence interval for the mean. Commit to answers now, before you run anything — you will come back to them at the end.
1a. Of your 100 intervals, how many do you expect to miss 50 entirely?
1b. If you increased the sample size from 25 to 100, would more intervals miss, fewer, or about the same number? What about the width of the intervals?
The population is Normal with mean = 50 and SD = 10 (the ground truth the simulator uses to generate data — you would never know it in real research). Each "sample" draws n observations, computes the sample mean, and builds a confidence interval as Chapter 5 does: mean ± t* × s / √n, with t* from the t distribution on n − 1 degrees of freedom.
An interval is drawn grey if it captures 50 and orange if it misses. This is the interactive version of the figure in Chapter 5's section on interpreting a confidence interval.
Each horizontal line is one sample's confidence interval. The dashed green line is the true mean, 50.
Keep the confidence level at 95%. For each sample size, click Clear, then Draw 100 samples, and read the numbers off the tally box.
| n | How many of 100 captured 50 | Typical interval width (wide / medium / narrow) |
|---|---|---|
| 10 | ||
| 25 | ||
| 100 |
Q1. The fraction of intervals that captured 50 stayed near the same value at every sample size. What number was it near, and why does it not depend on n?
Q2. What did change as n grew? In one sentence, say what a larger sample buys you here.
Q3. Set n = 25 and switch the confidence level to 90%, then draw 100. Did more or fewer intervals miss 50? Does a 90% interval promise more or less than a 95% one?
Now the simulator compares two groups — control vs. treatment. There is a real effect: the populations differ by Cohen's d = 0.5 (a solid, meaningful difference). That never changes.
Each "study" draws a fresh sample of n per group, runs Welch's t-test (t.test() — R's default), and plots the 95% CI for the difference in means. The interval is green if it excludes 0 (a significant result) and grey if it includes 0 (would be reported as "no significant difference"). Watch the interval dance from study to study even though the true effect is fixed.
Each line is one study's 95% CI for the difference in means. Solid line at 0 (no difference); dashed line at the true difference.
For each sample size, click Clear, then Run 100 studies, and record from the tally box.
| n per group | How many of 100 were significant (CI excluded 0) | How many would be reported as "no significant difference" |
|---|---|---|
| 10 | ||
| 20 | ||
| 45 |
Q4. The true effect (d = 0.5) was present in every single study. At n = 20, roughly what fraction of studies still came back "not significant"?
Q5. A researcher runs this two-group study once, at n = 20, gets p = .19, and writes "there was no effect." Using your table, explain in two or three sentences why that conclusion is not justified — and what they should have written instead.
Q6. Look at the CI for the difference across studies. Almost all of them contained the true difference (that is coverage again). But their significance verdict flipped constantly. In your own words, why are "does the CI contain the true value?" and "does the CI exclude 0?" different questions?
Write a two-sentence interpretation for each result, the way it should appear in a Results section. Report the effect size and its interval, not just the verdict (APA 7, Chapter 15).
Scenario 1. Welch's t-test, n = 18 per group, t(33.1) = 1.44, p = .16, Cohen's d = 0.48, approximate 95% CI for d [−0.18, 1.14].
Scenario 2. Welch's t-test, n = 1,200 per group, t(2380.4) = 3.10, p = .002, Cohen's d = 0.13, 95% CI for d [0.05, 0.21].
Every interval in this module is one line of R. For a single sample, t.test() reports the mean and its confidence interval:
set.seed(1) sample_scores <- rnorm(25, mean = 50, sd = 10) t.test(sample_scores, mu = 50) # ... # 95 percent confidence interval: # 47.76480 55.60851 # sample estimates: # mean of x # 51.68665
For two groups, t.test() reports the Welch CI for the difference — the interval Step 4 was plotting:
t.test(treatment, control) # Welch's t-test, R's default
confint(lm(outcome ~ group)) uses the equal-variance linear-model version instead, so its interval need not match Welch's interval.
Q7. Run the one-sample block above. Your textbook says a 95% CI means "if you repeated the study many times, about 95% of the intervals would capture the true value." This one interval, [47.76, 55.61], either does or does not contain 50. Which is it — and does that tell you anything about whether this particular interval is one of the 95%?
R1. Go back to your Step 1 predictions. Which one was closest, and which was furthest off? What in the simulator changed your thinking?
R2. From Chapter 5: "A study finds no significant difference between a drug and placebo (p = .18, n = 12 per group). A journalist writes 'the drug has no effect.'" Using what Step 4 showed you, write the correction you would send the journalist.
R3. A classmate says: "My 95% CI was [2.1, 8.4], so there's a 95% chance the true effect is between 2.1 and 8.4." Write the reply you would give.
Grading: Credit/no-credit, not scored for correctness — but credit requires a genuine attempt; blank or clearly-unattempted answers earn no credit. Your simulator numbers will not exactly match your partners'; that is the point.
ci-dance_lastname1_lastname2.pdf and upload to the course site.