4.9.19 · D4Probability Theory & Statistics

Exercises — Confidence intervals — derivation for mean, proportion

2,391 words11 min readBack to topic

A quick reminder of the two recipes you will reuse everywhere:

Here is the shape of the game — the picture every problem draws:

Figure — Confidence intervals — derivation for mean, proportion

The tall pastel curve is the sampling distribution. The critical value marks where we cut off tail probability on each side; multiply it by the standard error and you get the half-width (the margin of error) that we slap on either side of the estimate.


Level 1 — Recognition

L1.1 For each scenario, name which of the three formulas applies (z-mean / t-mean / z-proportion): (i) known, , estimating a mean. (ii) unknown, , sample SD given, estimating a mean. (iii) 300 of 500 voters say "yes", estimating .

L1.2 A 90% confidence interval. What value of is this, and what critical value do you look up?

Recall Solution L1.1

(i) is known → use the z-mean formula . (ii) unknown and small → use the t-mean formula with degrees of freedom. (iii) Count of successes out of trials → this is a proportion, use .

Recall Solution L1.2

Confidence level is , so . We split into two tails, so each tail has . The critical value is . (Note: is the two-tailed 90% value — it is also the one-sided 95% value, which is the source of a famous trap; see below.)


Level 2 — Application

L2.1 A thermostat's readings have known C. A sample of readings averages C. Build a 99% confidence interval for the true mean temperature.

L2.2 A sample of batteries has mean life hours and sample SD hours ( unknown). Build a 95% CI. Use .

L2.3 In a survey, of people own an electric car. Build a 95% CI for the true proportion .

Recall Solution L2.1

Step — standard error. . Why ? We bound the mean, whose spread is , not one reading's spread. Step — critical value. 99% → . Step — margin. . Answer. C.

Recall Solution L2.2

Step — why t. unknown and is smallish, so use t with df. Step — standard error. . Step — margin. . Answer. hours.

Recall Solution L2.3

Step — point estimate. . Check normality: ✓ and ✓. Step — standard error. Step — margin. . Answer. .


Level 3 — Analysis

L3.1 Two labs estimate the same mean. Lab A: , 95% CI half-width . Lab B uses the same but . Without numbers, by what factor is Lab B's margin smaller than Lab A's? Explain via the formula.

L3.2 A student computes a 95% CI of (this is example (b) from the parent, , , ). They then claim: "There is a 95% probability the true mean lies between 65.74 and 74.26." Is this correct? State the precise correct interpretation.

L3.3 Recompute the L3.2 interval as if you (wrongly) used instead of . By how much (in score points) is the half-width understated? Which interval is the honest one, and why?

Recall Solution L3.1

The margin is . Only changes. Lab B's margin is half of Lab A's. Lesson: to halve the margin you must quadruple the sample size — precision costs quadratically. (This is exactly the lever used in Sample Size Determination.)

Recall Solution L3.2

Not correct. Once the numbers are fixed and the true is a fixed (if unknown) constant, is either inside or outside — the probability is or , there is no "95%" left to speak of for this interval. Correct interpretation: "If we repeated the whole sampling procedure many times, about 95% of the intervals produced this way would contain the true mean ." The 95% describes the long-run reliability of the method, not one realized interval.

Recall Solution L3.3

Standard error is (unchanged by which multiplier you pick).

  • Honest (): .
  • Wrong (): . Understatement score points on the half-width. The -interval is honest. Because is only an estimate of and can run low for small , the true uncertainty is larger; the fatter t-tails widen the interval to compensate. Using pretends you know exactly.

Level 4 — Synthesis

L4.1 (invert the margin — mean). You want a 95% CI for a mean with margin no larger than , and you know . What is the smallest sample size ? (Solve the margin formula for , then round up.)

L4.2 (invert the margin — proportion, worst case). You want a 95% CI for a proportion with margin , but you have no prior estimate of . Use the worst-case value of . Find the smallest .

L4.3 (CI ↔ test). A 99% CI for a mean comes out as . A colleague hypothesizes ; another hypothesizes . For each, would a two-sided test at level reject ? Explain using only the interval.

Recall Solution L4.1

Start from . Solve for : Plug in , , : Sample size must be a whole number and the margin must be at most , so round up: . (Why round up, never down? gives a slightly larger margin than , violating the requirement.)

Recall Solution L4.2

Margin: . The product is largest at , where it equals . Using this worst case guarantees the margin no matter what turns out to be. Round up: . (This is why "±3% margin" national polls sample roughly a thousand people.)

Recall Solution L4.3

Rule: a two-sided level- test rejects exactly when lies outside the corresponding CI.

  • : is ? Yes. So we fail to reject — 50 is a plausible mean.
  • : is ? No (). So we reject at . The interval is the set of null values you would not reject — that is the CI↔test duality.

Level 5 — Mastery

L5.1 (full proportion build with all checks). A quality auditor inspects items and finds defective. (a) Verify the normal-approximation conditions. (b) Build a 90% CI for the defect rate . (c) The factory guarantees "defect rate below 8%." Does your CI let you rule that guarantee out, or is 8% still plausible?

L5.2 (comparing methods on one dataset). For a sample of with and , build the 95% CI two ways: (a) correctly with ; (b) incorrectly with . Report both half-widths and the percentage by which the wrong method understates the true half-width.

Recall Solution L5.1

(a) Conditions. . Check ✓ and ✓. Normal approximation is valid. (b) 90% CI. , . . CI . (c) Is 8% ruled out? The interval reaches up to . Since lies inside the interval, we cannot rule out a true defect rate of 8% at this confidence — it remains plausible. The guarantee is not statistically contradicted (nor confirmed) by this sample.

Recall Solution L5.2

Standard error is common to both: . (a) Correct (t): . CI . (b) Wrong (z): . CI . Understatement percentage: . The -interval is about 15% too narrow — a serious overconfidence for . Small samples punish the -shortcut hardest, since has much fatter tails when is tiny.


Recap

Recall One-line takeaways from D4
  • Halve before looking up (L1).
  • The width lives in the standard error , not (L2).
  • Confidence is about the procedure, and is the honest choice when is estimated (L3).
  • Invert the margin formula and round up to hit a target precision; worst-case for proportions (L4).
  • Always check normality conditions and judge claims against the whole interval (L5).

Connections