Confidence Intervals
Context: FIT2086_MOC · interval estimation — the second of the three inference tasks, after the point estimation of Maximum Likelihood Estimation · built entirely on the sampling distribution of (Sampling Distribution of an Estimator), exactly where the population is normal and via the CLT everywhere else · the machinery reused in W5 by Hypothesis Testing, where the same pivot is re-centred on a fixed null value
Quick Revision
- 🎯 Objective: a procedure with ➔ estimate (critical value) (standard error).
- 📦 Core Components: known ➔ | unknown ➔ | difference of means ➔ variances add | non-normal population ➔ CLT approximation.
- ⚡ Key Constraint: the guarantee attaches to the procedure under repeated sampling, never to the one interval you computed — is fixed, not random, so your interval either covers it or does not.
📝 Core
- Point vs interval ➔ point estimation returns one value ; sampling randomness guarantees it is not exactly right, so interval estimation returns to quantify the uncertainty.
- Width reads as uncertainty ➔ narrow interval low uncertainty · wide interval high uncertainty.
- Coverage definition ➔ is a confidence interval if , the probability taken over samples from the population: for of the samples you could have drawn, the generated interval covers the true .
- Frequentist reading, stated precisely ➔ before sampling there is a chance of drawing a whose interval covers ; after sampling the interval is fixed and either covers or does not — no probability remains to be assigned.
- Standard error is the scale unit ➔ , i.e. for a sample mean with known variance and in the approximate case; every interval below is .
- Critical values from the unit normal ➔ with the quantile function: (), (), () — lower confidence ⟹ smaller multiplier ⟹ narrower interval.
- The interval is degenerate ➔ covering the parameter for every possible sample forces ; it is useless precisely because it excludes nothing. Confidence is bought with width.
- Three width drivers ➔ width is proportional to , inversely proportional to (quartering the width costs the data), and increases with the confidence level .
- Reporting template ➔ “The estimated mean BMI of diabetic Pima people () is . We are confident the population mean lies between and .” — estimate, then , then the interval, then the population-level claim.
🧮 Proof Blueprint
Theorem. For with known, is a confidence interval for . Strategy: standardise the exact sampling distribution into , bracket it with symmetric percentiles, then invert the inequalities onto .
Q.E.D. ➔ for of possible samples the population mean lies within of the sample mean; replacing by generalises to any .
⚖️ Which Interval Fires
| Case | Population assumptions | Interval | Critical value | Coverage |
|---|---|---|---|---|
| 1. Normal mean, known | , given | exact at every | ||
| 2. Normal mean, unknown | , use | (Student-t Distribution) | exact if population normal | |
| 3. Difference of two means | independent samples ; all unknown | approximate, improving with | ||
| 4. Any sample-mean estimator | , only; | approximate via the CLT |
When It Flips: Case 1 collapses into Case 2 the moment is estimated from the same data — and always, so the honest interval is the wider one. Case 4 subsumes Case 3's logic for non-normal populations: with , gives .
📊 Worked Examples — Pima BMI
Diabetic sample , ➔ , . Non-diabetic sample , ➔ , .
| Case | Inputs | Computation | Interval |
|---|---|---|---|
| 1 — known (external study) | |||
| 2 — unknown | |||
| 3 — difference |
Final extracted output: Case 2 is wider than Case 1 on identical data — the cost of not knowing . Case 3’s interval contains zero, so a population-level difference in BMI between diabetic and non-diabetic Pima people cannot be ruled out either way.
🎯 Reading a Difference Interval
- Entirely negative ➔ suggestive of a genuine negative difference at the population level ().
- Entirely positive ➔ suggestive of a genuine positive difference ().
- Contains zero ➔ is compatible with the data — report “cannot rule out no difference”, which is not evidence that the difference is zero.
- Why variances add, not subtract ➔ independence of the two samples gives ; the minus sign in the estimate never reaches the variance.
➕ Further Intervals
- Proportion (Case 4 instantiated) ➔ is a sample mean with , so the CLT gives — the plug-in form used in Studio 4. (The W5 test-summary table writes the same interval with in the radicand, matching the null-based standard error of the test itself ➔ Tests for Bernoulli Populations.)
- Worked — the coin toss ➔ , heads ➔ ; . The interval contains , so a fair coin is not ruled out — but it also spans “heavily tail-biased” to “slightly head-biased”, i.e. buys almost no information.
- Two proportions ➔ with the pooled .
- Small- difference of means, equal variances (slides flag this as optional extra) ➔ with the pooled .
- Small- difference of means, unequal variances ➔ same estimate, but on the Welch–Satterthwaite ➔ both forms in Tests for Normal Means (z-test and t-test).
- Every interval pairs with a test ➔ the W5 summary tables list each test statistic beside the interval built on the same standard error; learn them as one object, not two.
- A one-sided alternative yields a BOUND, not a range ➔ against the companion interval is : a plausible upper bound on , using rather than because the whole sits in one tail. On the Studio 5 blood-pressure data this is against the two-sided ➔ report the two-sided interval whenever a range of plausible values is wanted, and the one-sided one only alongside the directional test it answers.
- Same difference, three widths ➔ approximate vs Welch vs pooled on one two-sample difference give three intervals; the approximate one is narrowest and therefore slightly overconfident ➔ the S&P comparison in Tests for Normal Means (z-test and t-test).
🖥 Applied Layer (Studios 4–5)
- Compute and report ➔
calcCI(y, alpha)returns , and the interval; the two-group SP500 comparison and the reporting templates live in Confidence Intervals in R (calcCI). - Or let R do it ➔
t.test()returns the same interval, withconf.levelsetting andalternativeswitching a range for a bound ➔ Hypothesis Testing in R (t.test, binom.test, prop.test). - Confidence is bought with width ➔ on the blood-pressure data the two-sided interval runs at , at and at — covering more of the parameter space is the only way to raise the guarantee on fixed data.
- Audit the guarantee ➔ Cases 1–2 are exact at every ; every plug-in variance (Cases 3–4, the proportion form) undercovers at small — measured empirically in Confidence Interval Coverage Simulation.
⚠️ Common Mistakes
- 💡 “There is a probability that lies in ” ➔ the classic mark-loser: is a fixed constant, not an RV, so this interval has no probability attached. Say “we are confident”, meaning of samples produce covering intervals.
- 💡 Keeping after estimating ➔ is , not ; the interval undercovers — it is narrower than honesty allows.
- 💡 Using (divisor ) in Case 2 or 3 ➔ these intervals are built on the unbiased (divisor ); the ML variance is biased low, shrinking the interval further.
- 💡 Adding standard deviations for a difference ➔ overstates the standard error; add the variances, then take one square root.
- 💡 Forgetting the interval is only as good as the model ➔ Cases 1–2 need population normality and Cases 3–4 need large enough for the CLT; misspecification does not shrink with .
🧠 Active Recall
You compute a CI of . Why is " has a chance of being in here" wrong, and what is the right statement?
Answer
- Short answer: is a fixed population constant; once is observed the interval is fixed too, so it either covers or it does not — nothing is random any more. Correct: the procedure generates covering intervals for of possible samples.
- Why: The probability is over samples, not parameters ➔ has as the random object. This is the frequentist commitment; assigning probability to itself requires a Bayesian prior, which FIT2086 does not use here.
Two analysts use the same Pima sample. One reports , the other . Neither made an arithmetic error — what differs, and which should be published?
Answer
- Short answer: the first assumed known from an external study and used ; the second estimated from the eight points and used . With no external variance available, the interval is the defensible one.
- Why: Two sources of uncertainty demand two corrections ➔ estimating inflates the interval twice over — a larger scale ( here) and a larger multiplier () — which is precisely what restores coverage.
The Poisson rate estimator has no exactly-normal sampling distribution. How do you still put a interval on it?
Answer
- Short answer: is a sample mean, so the CLT gives ; substituting for the unknown yields the approximate interval .
- Why: The plug-in standard error is the general recipe ➔ for any with , is the standard error and the interval is ; the coverage is only approximate and improves with .