1.3.21 · D4Probability & Statistics

Exercises — Confidence intervals

2,807 words13 min readBack to topic

Before we start, one picture that every problem below leans on. Figure s01 shows the anatomy of a confidence interval: the coral line marks the point estimate at the centre; the lavender bar is the whole interval; and the two mint arrows are each the half-width of the interval, the margin of error (the symbol for it is defined just below). Read it as "the interval is with a symmetric cushion on each side." Every solution below builds or reads exactly this picture.

Figure — Confidence intervals

Critical values you'll need (memorise the top row):

Confidence
90% 0.10 1.645
95% 0.05 1.960
99% 0.01 2.576

Level 1 — Recognition

Recall Solution L1·Q1

What decides it: two questions — is known, and is large ()? Here is unknown and , so we must use the ==-distribution==. Its heavier tails pay for the extra uncertainty in using instead of . Degrees of freedom .

Recall Solution L1·Q2

(a) Point estimate is the centre of the interval (the coral line in Figure s01): (b) Margin of error is the half-width — the length of one mint arrow, the distance from centre to either end:

Recall Solution L1·Q3

99% confidence means . We split that leftover probability equally into two tails, so each tail holds . The value cutting off the upper 0.5% tail is If we used not we'd only guard one side and the net would leak on the other.


Level 2 — Application

Recall Solution L2·Q1

Step 1 — standard error (spread of the sample mean): Step 2 — margin of error (): Step 3 — the interval (, exactly the s01 picture):

Recall Solution L2·Q2

Step 0 — check the approximation is valid. The normal approximation to a proportion needs enough "successes" and "failures". The usual rule of thumb is and (a looser version uses ): Both comfortably clear the bar, so the normal approximation is safe. (If either were below 5–10 — e.g. a rare event — we'd switch to an exact binomial or Wilson interval instead.) Step 1 — point estimate: Step 2 — standard error for a proportion (binomial variance ): Step 3 — margin : .

Recall Solution L2·Q3

, so ; unknown and use .


Level 3 — Analysis

Recall Solution L3·Q1

Start from the definition of the margin and isolate step by step. Step 1 — write what we know: Step 2 — move up to meet . is buried inside in the denominator, so we first multiply both sides by and divide both sides by to get alone on one side: Step 3 — undo the square root. The unknown is still trapped under a , and the inverse of "square root" is "square", so we square both sides (squaring is legal here because every quantity — , , , — is positive): Step 4 — plug numbers: Always round up (a fractional person doesn't exist and rounding down misses the target):

Recall Solution L3·Q2

Width . To halve width, we need , i.e. The lesson: precision is expensive — cutting error in half costs the data. Figure s02 makes this concrete: it plots interval width against . The curve falls like , and the two marked dots ( in coral, in mint) sit at exactly half the height of each other — you slide four times to the right just to drop halfway down.

Figure — Confidence intervals
Recall Solution L3·Q3

Difference of independent estimates → variances add: The interval includes 0, so we cannot conclude B is truly better — see Hypothesis Testing and A/B Testing for the matched view.


Level 4 — Synthesis

Recall Solution L4·Q1

Mean: . Deviations & squares: ; sum . Sample variance (Bessel ): , so . Standard error: . Margin: . Interval — centre , cushion on each side:

Recall Solution L4·Q2

The -interval assumes approximate normality (or large so the CLT smooths things out); with , skew and an outlier violate both, so the interval will be mis-centred and mis-sized. The safer choice is a percentile bootstrap interval — resample the 8 scores with replacement thousands of times and read off the 5th/95th percentiles (see Bootstrap Methods and Cross-validation).

Recall Solution L4·Q3

Once computed, the interval is fixed and is a fixed (unknown) constant — the true mean is either in it or not, no probability left. The 90% describes the procedure: if we repeated this sampling-and-interval recipe many times, about 90% of the resulting intervals would contain .


Level 5 — Mastery

Recall Solution L5·Q1

Planning (use the expected 0.20). Proportion SE gives Observed CI with , (quick validity check: , , so the normal approximation is fine): The realised margin () slightly exceeds the target because observed has larger variance than the planned — a lesson in planning with the most conservative () when unsure.

Recall Solution L5·Q2

Frequentist net: the interval is random, is a fixed fish; 95% of the nets we throw catch it, but any one net either did or didn't. Bayesian pond: is treated as random with a probability distribution; the 95% credible interval genuinely holds 95% of that posterior probability, so "95% probability is inside" is legitimate there. Coincidence: with a flat (uninformative) prior and large , the posterior is dominated by the likelihood and the two intervals become numerically almost identical.

Recall Solution L5·Q3

Red flags:

  1. is tiny. The critical value is (far above ), which alone makes the net very wide — the study is badly under-powered.
  2. unknown and data non-normal. The -interval leans on approximate normality (or large via the CLT); with and skew, neither holds, so the interval is both mis-centred and mis-sized.
  3. The CI contains 0. Since straddles zero, the effect is not statistically distinguishable from "no effect" — you cannot claim a real effect exists.
  4. Reporting only the point estimate "3.0". Quoting the crisp centre hides that the honest interval spans , a huge range; that is false precision (the L3-style "wide interval is honest" lesson).

What to do instead: collect more data — recall from L3·Q2 that halving the width needs the sample; use a bootstrap percentile interval given the non-normality; back the interval up with a formal hypothesis test on whether the effect differs from 0; and always report the full interval, never the point estimate alone.