4.9.19 · D1Probability Theory & Statistics

Foundations — Confidence intervals — derivation for mean, proportion

2,890 words13 min readBack to topic

This page assumes nothing. Before you touch the parent derivation, we name every letter, squiggle, and idea it silently uses, in an order where each one leans on the last.


0. Population vs. sample — the two worlds

Everything below lives in one of two worlds. Confusing them is the #1 way people get lost, so we draw them first.

Figure — Confidence intervals — derivation for mean, proportion

1. — the sample size

Why the topic needs it: every wobble in this chapter shrinks as grows. is the single knob you control. Bigger → tighter interval. That's the whole reason Sample Size Determination exists.

The picture of : it's just how many dots you drew from the population blob in the figure above.


2. — the population mean (the target)

Why the topic needs it: is the thing we are trying to trap inside our interval. It never moves. This fixedness is why "there's a 95% chance is in this interval" is wrong — isn't the random thing; the interval is.

The picture: a single fixed pin on the number line. Our job is to throw a ring (the interval) and hope it lands over the pin.


3. — the sample mean (our estimate)

Let's decode (capital Greek "sigma") right now, because the parent uses it constantly.

Why the topic needs : it is our guess for . It's a fair guess (it's right on average), but for any one sample it's off by a little. Measuring that "little" is the entire game.

The picture: take a few dots from the population blob, find their balance point — that's . Grab a different handful and the balance point shifts.


4. and — spread of one measurement

Why square then square-root? If we just averaged the signed distances, the pluses and minuses would cancel to zero and tell us nothing. Squaring kills the signs; the final square root restores readable units.

The picture: the width of the bell-shaped cloud of individual bottles. describes one bottle's wobble — not the wobble of the average. That distinction is the crux of the next section.


5. — the expectation operator

Before we can say what the sample mean does "on average", we must define what "on average" means as a symbol, because the parent note leans on it.

Why the topic needs it: it lets us state precisely that our estimate is centred right. Saying means "if you drew countless samples and averaged all their 's, you'd land exactly on the truth " — that is what makes an unbiased guess.

The picture: the balance point of the whole cloud of possible 's, which we draw next.


6. The sampling distribution — the star of the show

Here is the idea the whole topic pivots on. Read slowly.

Figure — Confidence intervals — derivation for mean, proportion

Before the formulas, we name one more operator the parent uses without ceremony.

Why does the spread shrink? When you average independent measurements, their random highs and lows partly cancel. Averaging is a steadying act. The parent note proves it algebraically; the picture is: the more spoons of soup you taste, the more your average saltiness settles down toward the truth.


7. Standard error — the wobble that actually matters

The picture: in the figure above, is the width of the wide pale cloud (individuals); SE is the width of the narrow blue cloud (the averages). Same centre, very different widths.


8. The bell curve , the CLT, and its conditions

Why does a bell curve show up at all? Because of the Central Limit Theorem (CLT): averages of many independent things pile up into a bell, no matter what shape the originals had. That is the engine letting us use one universal curve for everything — but it only fires when its conditions hold.

Why the topic needs the conditions: if they fail (e.g. cherry-picked non-random data, or a tiny from a wildly skewed population), the bell is the wrong shape and every interval below is untrustworthy.

Figure — Confidence intervals — derivation for mean, proportion

9. , , and the critical value

Handy trio: , , .


10. , degrees of freedom, and — when is unknown

Because is itself a wobbly guess of , standardising with it gives a curve with fatter tailsStudent's t-distribution, written . Fatter tails = wider interval = honest extra caution. As , the fat tails slim down and .


11. , — proportions are just averages of 0s and 1s

Hence the proportion standard error , estimated as — the same "spread over " pattern.


12. Assembling the interval — the payoff

Now every piece clicks together. All three formulas in the parent share one skeleton:

Fill the skeleton three ways:

Notice: the same skeleton, three costumes. That is the "one idea wearing different costumes" promised at the top. The parent note derives each box algebraically; here you can see they are siblings.


Prerequisite map

Population vs sample

Sample mean X-bar

True mean mu

Summation sign

Variance and sigma

Var operator

Sampling distribution of X-bar

Expectation E

Sample size n

Standard error sigma over root n

Central Limit Theorem plus conditions

Normal bell and Z score

Alpha and critical value

Universal recipe estimate plus minus crit times SE

Sample SD s and n minus 1

Student t

Bernoulli 0 and 1

Proportion p-hat

Confidence interval formulas


Equipment checklist

Say each answer out loud before revealing.

The difference between and
is the fixed unknown population mean; is the known but random sample average that estimates it.
What means
Add up through — a loop that sums.
What means
The long-run average over infinitely many repeats; a probability-weighted average of all outcomes.
What means
The variance operator — average squared distance of its argument from that argument's own mean.
Why we divide the sum by to get
To turn a total into an average (balance point).
What measures vs. what SE measures
= spread of one measurement; SE = spread of the sample average.
Why shrinks with
Averaging independent values lets highs and lows cancel, steadying the estimate.
The four conditions the CLT needs
independent; identically distributed; large enough; finite-population correction negligible.
What a -score of 2 means
The estimate sits 2 standard errors above the target.
Why is halved into
We leave equal probability in both tails, so the central band holds .
The critical value for 95% confidence (two-sided)
.
Why uses not
One degree of freedom is used up because deviations from must sum to zero.
Why proportions reuse the mean machinery
is the sample mean of Bernoulli 0/1 values, with .
The universal CI skeleton
estimate critical value standard error.

Connections

  • Central Limit Theorem — why the bell curve appears for , and the conditions it needs.
  • Standard Error — the wobble in full.
  • Student's t-distribution — the fat-tailed curve for unknown .
  • Bernoulli & Binomial Distributions — the 0/1 world behind proportions.
  • Sample Size Determination — the knob that shrinks every interval.
  • Hypothesis Testing — the mirror-image use of the same ruler.