Join · scan

OTTO-INF3

ottolearn.org/join

Module 4 · Statistical Inference · INF-3

Small Samples & the t-Distribution
"The IOU comes due."

Last class ended with a debt on the books: Maya used her survey's \(s = 1.3\) as if it were the true \(\sigma\) — forgivable at \(n = 300\). Today the editor wants a follow-up — "do the varsity athletes sleep even worse?" — and between 6 a.m. practices Maya can reach exactly nine of them. Same swap, nine data points. Today: what the shortcut silently breaks, and the 1908 invention that pays the debt properly.

Live session · join with code OTTO-INF3 · ottolearn.org/join

Same rules as always: vote before I explain, every poll is anonymous, and changing your mind after discussion is the goal.

Today · nine athletes, five questions

From a tempting shortcut to an honest interval.

Watch last class's recipe silently mislabel itself on a small sample, meet the distribution invented in a brewery to fix it, learn to read its table, build the honest interval — and see why the wider answer is the better one. Every step starts with your vote.

Recall · last class · 45 seconds

Warm-up · commit first · 60 seconds · anonymous

Hold your answer — the first poll of the day settles it with a hundred rehearsals.

Commit first · today's summit

Core concept 1 · C1

The z-recipe at \(n = 9\): a mislabeled product

The recipe ran without complaint — that's the trap. Nothing in \(\bar{x} \pm z^* \cdot s/\sqrt{n}\) warns you that one of its ingredients is now a rough guess.

The swap

Same move as last class: the sample's \(s\) stands in for the unknown \(\sigma\). At \(n = 300\), \(s\) hugs \(\sigma\) tightly and the swap is nearly free. At \(n = 9\), \(s\) itself wobbles hard from sample to sample — some nines luck into a small \(s\), others a large one.

\(s \rightarrow \sigma\)

What silently breaks

The z-bell was computed for a known \(\sigma\). Pretending \(s\) is exact makes the intervals too narrow — they claim more precision than nine points bought, so across many samples they miss \(\mu\) more often than the label admits.

The honest fix (preview)

Not a bigger label — a wider yardstick: a distribution with heavier tails that charges for the extra doubt automatically, and charges less as \(n\) grows. It was invented in a brewery, and it's the next slide.

The warm-up, resolved: the swap is not safe at nine — the label stops matching the delivery. First, watch the mislabeling happen a hundred surveys at a time:

See it · C1 · the anchor, resolved

A hundred small surveys, two recipes

Predict first: at \(n = 6\), 95%, method z — where will the coverage rate settle after many runs? Then I switch the method to t: what should the rate do, and what visibly changes about the intervals?

Figure 2: Each bar is a confidence interval from a different random sample of size n drawn from a normal population with μ = 0. Green bars capture μ; red dashed bars miss it. Switch the method from t to z with a small n to see the coverage rate fall below the nominal level — the defining flaw that the t-distribution corrects.

Core concept 2 · C2

Student's \(t\): the bell that owns up to its doubt

In 1908, Guinness brewer William Gosset faced Maya's exact problem — quality checks on four barrels, not four hundred. The brewery guarded its methods as trade secrets, so he published the fix under a pseudonym: "Student." His distribution is the z-bell's honest cousin.

Heavier tails

Same center (0), same symmetry, same bell silhouette — but more probability parked in the extremes. The heavy tails are the fee for estimating \(\sigma\): extreme outcomes genuinely are more likely when your yardstick is itself a guess.

\(t\ \text{vs}\ N(0,1)\)

A whole family

Not one curve — one per degrees of freedom. Few data points → heavy tails (lots of doubt about \(s\)); more data → the tails lighten. Which family member you use is priced by \(df\), and the price list is the next slide.

\(df = n - 1\)

It converges to \(z\)

As \(n\) grows, \(s\) locks onto \(\sigma\) and the doubt fee shrinks: the t-curve melts into the normal. That's why last class's swap was forgiven — at \(n = 300\), \(t\) and \(z\) are near-twins. At \(n = 9\), they are not.

\(df \to \infty:\ t \to z\)

One distribution, built to charge exactly the right fee for a guessed \(\sigma\) — steep at \(n = 9\), nearly free at \(n = 300\). Watch the tails carry the doubt:

See it · C2

Watch the tails carry the doubt

Predict first: at \(df = 5\), is the 95% critical value closer to 2.0, 2.6, or 3.2? Then slide \(df\) up — at what point can you no longer tell the two curves apart?

Figure 1: t-distribution vs. standard normal. Adjust the df slider to watch the t-distribution converge toward the normal. Toggle critical values to see how t* is always larger than z* for the same confidence level — and by how much.

Core concept 3 · C3

Degrees of freedom: why \(n - 1\), not \(n\)

The family is indexed by \(df = n - 1\) — and the subtraction isn't a convention, it's an accounting fact: computing \(s\) spends one piece of information before the spread is measured.

The locked last value

To get \(s\), you first compute \(\bar{x}\) — and once \(\bar{x}\) and eight of Maya's nine values are on the table, the ninth is fully determined: the deviations from \(\bar{x}\) must cancel out. Only eight deviations are free to vary.

\(\textstyle\sum (x_i - \bar{x}) = 0\)

The rule

Nine athletes → \(df = 8\). Sixteen swimmers → \(df = 15\). The degrees of freedom are the row of the t-table you're about to read — always one less than the count.

\(df = n - 1\)

The classic slip

The single most common error in this topic: reading row \(n\) instead of row \(n - 1\). Wrong row → wrong \(t^*\) → wrong interval, every time. Subtract before you look. Today's practice items set this trap once each — on purpose.

\(df \neq n\)

One subtraction, then a lookup. The lookup is next — the new table has a second dimension, and the row is exactly this \(df\).

Core concepts 4–5 · C4

The t-table: pick the row, then the column

The normal table needed one number; the t-table needs two. The row is \(df = n - 1\) — how much doubt. The column is the confidence level — how much warranty. The cell where they meet is \(t^*\).

Row = degrees of freedom

Maya's athletes: \(n = 9\) \(\Rightarrow df = 8\) — row 8, not row 9. The row prices how shaky the estimate \(s\) is: the smaller the \(df\), the bigger every value in the row.

\(df = 9 - 1 = 8\)

Column = the warranty

Same three warranties as last class — 90%, 95%, 99% — one column each. Row 8, column 95%: \(t^* = 2.306\). Compare \(z^* = 1.96\): the nine-point sample pays about 18% more width for the same label.

\(t^*_{8,\ 95\%} = 2.306\)

The bottom row is an old friend

Slide down any column and \(t^*\) shrinks toward the \(\infty\) row — which reads 1.645, 1.96, 2.576: exactly the z-values. The z-recipe is the t-table's basement: the doubt fee fully faded.

\(1.645,\ 1.96,\ 2.576\)

Row, column, cell — that's the whole skill. See the lookup run end to end, then drill it until the \(n - 1\) reflex is automatic:

See it · C4

The lookup, end to end

Predict first: I'll set \(n = 9\) at 95%. Which row lights up — 8 or 9? Then, holding the level fixed, what happens to \(t^*\) as I grow \(n\)?

n = 6 df = n − 1 = 5
Confidence level
Figure 4: Pick a sample size and confidence level. The lookup always goes n → df = n − 1 → confidence column → t* — you read the table at row df, never row n. The highlighted cell and the readout above update together so the off-by-one step stays visible.

Practice · read the table, solo · fresh numbers on demand

Core concept 6 · C6

The honest recipe: same skeleton, new yardstick

Put last class's recipe and today's side by side and only two symbols move — and they move together, for the same reason: \(\sigma\) is now honestly unknown.

What stays

The whole architecture: point estimate in the middle, reach out a margin \(E\), print the range, say the claim in words. Everything you learned about intervals last class transfers untouched.

\(\bar{x} \pm E\)

What moves — together

\(s\) replaces \(\sigma\) (the data must supply the spread), and \(t^*\) replaces \(z^*\) (the yardstick must charge for that). The two swaps are one package — never mix \(t^*\) with a known \(\sigma\), or \(z^*\) with a nine-point \(s\).

\(z^* \to t^*,\ \ \sigma \to s\)

The formula

with \(t^*\) read from row \(df = n - 1\) at your chosen level. Same three ingredients as always — center, warranty dial, yardstick — with the dial now reading the t-table instead of the normal table.

\(\bar{x} \pm t^* \cdot \dfrac{s}{\sqrt{n}}\)

Watch one assemble first — then I'll build the athletes' interval for real, the one the editor is waiting on.

See it · C6

Watch the t-interval assemble

Predict first: with \(n = 9\) and \(s = 30\), will the t-interval be wider or narrower than the z-version — and by a little or a lot? Then find which control closes the gap.

Figure 3: Adjust n and s to watch every piece of the formula update live. Notice that df = n − 1 (not n) controls which row of the t-table you look up, and that t* is always larger than z* — making the t-interval always wider than the z-approximation for the same data.

I do · watch a full build

  1. 1 I do
  2. 2 We do
  3. 3 You do

Watch me decide every step out loud — check the license (shape now matters), price the doubt (\(df \to t^*\)), compute the margin, assemble the claim and say it in words.

The athletes' interval — built honestly this time

Step 1 · Check the license

Random-ish sample? The nine came from a roster draw, not volunteers — ✓. \(\sigma\)? Honestly unknown: only \(s = 30\) min, computed from the nine — ✓, so \(t\) is required. Shape? Small \(n\) means no CLT rescue, so I check the dot plot: one mound, roughly symmetric, no wild outliers — normality is plausible. License granted.

Step 2 · Price the doubt

Nine athletes \(\Rightarrow df = 9 - 1 = 8\) — row 8, not row 9. The paper's standard warranty: the 95% column. The cell: \(t^* = 2.306\). Sanity check before moving on: heavier than \(z^* = 1.96\), exactly as nine-point doubt demands.

Step 3 · Compute the margin

Yardstick: \(\text{SE} = s/\sqrt{n}\) \(= 30/\sqrt{9}\) \(= 10\) min. Reach: \(E = t^* \times \text{SE}\) \(= 2.306 \times 10\) \(= 23.06\) min. The z-shortcut would have reached only \(1.96 \times 10 = 19.6\) — I'm buying about 3½ extra minutes of honesty per side.

Step 4 · Assemble — and say it

\(386 \pm 23.06\) \(\Rightarrow (362.94,\ 409.06)\) min — roughly 6.0 to 6.8 hours. In words: "We are 95% confident the athletes' true average sits between 363 and 409 minutes." Now look hard at the top end: 409.

The campus average is 408 minutes. The z-shortcut's interval, \((366.4,\ 405.6)\), excludes it — headline: "athletes sleep less than average." The honest interval includes 408: the data can't back that headline. The shortcut wasn't just narrow — it printed a claim nine data points never earned.

We do · you finish it

  1. 1 I do
  2. 2 We do
  3. 3 You do

New team, new numbers: you supply the margin and the interval — the row changes, the habit doesn't.

Next on the desk: the swim team

Same follow-up, second team. Sixteen swimmers' logs: \(\bar{x} = 402\) min, \(s = 40\) min, \(\sigma\) unknown, dot plot one clean mound. Build the 95% interval.

  1. License: random roster draw ✓, \(\sigma\) unknown (only \(s\)) ✓, shape plausible ✓ — \(t\) required.
  2. Price the doubt: \(df = 16 - 1 = 15\); row 15, column 95%: \(t^* = 2.131\).
  3. Yardstick: \(\text{SE} = 40/\sqrt{16}\) \(= 10\) min.
  4. Finish it: \(E = ?\) — and the interval is…? (Then check it against the campus 408.)

    \(E = 2.131 \times 10\) \(= 21.31\) min \(\Rightarrow 402 \pm 21.31\) \(= (380.69,\ 423.31)\) min. It contains 408 comfortably — no "swimmers sleep differently" story either. Two honest intervals, two non-headlines: that's a finding too, just not the loud kind.

Practice · build the t-interval, solo · fresh numbers on demand

  1. 1 I do
  2. 2 We do
  3. 3 You do

Now you build whole t-intervals solo — fresh numbers every re-roll, the table excerpt in every item, support at its minimum.

Core concept 7 · C7

The license: three checks before any t-interval

The t-distribution pays for a guessed \(\sigma\) — it does not pay for bad sampling or a wild population shape. Three boxes to tick, every time:

1 · Random sample

Independence comes from the draw, not from the data. Nine volunteers who "felt like sharing their sleep" break the license before any formula runs — the same rule since the very first survey.

2 · \(\sigma\) honestly unknown

The tell: \(s\) was computed from the sample. (If \(\sigma\) genuinely is known — a machine with years of records — the z-recipe stays exactly correct at any \(n\). That fork is two slides away.)

3 · Shape roughly normal

Small \(n\) means no CLT rescue — the population itself must look roughly normal. Check the picture: one mound, rough symmetry, no extreme outliers. one mound ✓strong skew ✗outlier ✗

License granted → build. License denied (strong skew, extreme outliers at tiny \(n\)) → collect more data, or report honestly that no interval is defensible yet. Now, the everyday fork:

Core concept 8 · C8

The fork: one question — is \(\sigma\) known?

C7 was the stop sign: may we build at all? This is the fork just past it: which yardstick? One question decides — and it is not "is \(n\) big?"

\(\sigma\) known → \(z\)

Years of machine records, a published spec — genuine outside knowledge of \(\sigma\). Then the z-recipe is exactly right at any \(n\), even \(n = 9\). (Rare outside factories and labs.)

\(\bar{x} \pm z^* \cdot \sigma/\sqrt{n}\)

\(\sigma\) estimated → \(t\)

If \(s\) came from the data, use \(t\) — always, at every \(n\). This is most of real life: nobody hands a reporter the true \(\sigma\). The only question left is which row: \(df = n - 1\).

\(\bar{x} \pm t^* \cdot s/\sqrt{n}\)

Big \(n\): the fork relaxes

At \(n = 300\), \(t^* \approx 1.968\) vs \(z^* = 1.96\) — last class's shortcut was a rounding error, which is why it was forgiven. \(t\) stays the principled choice; \(z\) is its acceptable big-\(n\) approximation.

\(df \uparrow:\ t^* \to z^*\)

The decision runs on information, not on sample size: known \(\sigma\) → \(z\); estimated \(\sigma\) → \(t\). See the whole map, then vote it:

See it · C8

The decision map

Predict first: where does "\(n = 45\), \(\sigma\) unknown" land — and does the answer change at \(n = 9\)? Find the one region where \(z\) is legitimate at small \(n\).

Figure 4: Work through six scenarios. At each step the flowchart lights up the path you have taken — reinforcing the habit of asking "Is σ known?" first, then "Is the population approximately normal?"

Which tool applies? · mixes earlier classes + today

Practice · pick the yardstick, solo · fresh numbers on demand

Core concept 9 · C9

The sentence survives: interpretation carries over unchanged

New table, same contract. Everything the opening poll rehearsed about "95% confident" applies to t-intervals word for word.

What Maya may print

"We are 95% confident the athletes' true average sleep is between 363 and 409 minutes." — the same accepted shorthand as last class, crediting the method that built the interval.

What the 95% still is

A statement about the procedure: across many nine-athlete studies, about 95% of t-intervals built this way capture \(\mu\). The t-table's entire job was making that promise true again at small \(n\).

What it still is not

Not a probability on \(\mu\) (a fixed constant), not a range for individual athletes, not a promise about future samples. Every misread from last class stays a misread — no new ones today.

That's the quiet payoff of the whole lesson: \(t\) exists so that the printed warranty means what it says — at \(n = 9\), not just \(n = 300\).

Core concept 10 · C10

Wider is not worse — wider is the truth

Two intervals now sit on Maya's desk, built from the same nine logs. Instinct says print the tighter one. Instinct is wrong.

The price is real

At \(df = 8\): \(t^* = 2.306\) vs \(z^* = 1.96\) — about 18% more width. The gap is the doubt about \(s\), priced. It shrinks as \(n\) grows and never quite reaches zero.

\(t^* > z^*\)

The tempting one

The z-interval \((366.4,\ 405.6)\) looks better — tighter, more decisive, and it comes with a headline. But its 95% label is unearned: it's the interval that misses \(\mu\) more often than it admits.

The honest one

The t-interval \((362.94,\ 409.06)\) is wider because it isn't hiding anything. When \(\sigma\) is guessed, honest uncertainty is wider uncertainty. Precision you didn't pay for is confidence theater.

A narrower interval is only better if its label is true. One last vote to make it stick:

Quick check · which one gets printed?

Production task · the follow-up she files

Exit ticket · 60 seconds · anonymous

What Maya files

The debt is paid — and the headline that wasn't

The IOU from last class is settled: when \(s\) stands in for \(\sigma\), the yardstick must charge for the doubt — Student's \(t\), row \(df = n - 1\). At \(n = 300\) the fee was invisible; at \(n = 9\) it was the whole story.

The honest interval — \((362.94,\ 409.06)\) minutes — kept its promise by being wider, and it quietly killed a false headline the z-shortcut would have printed. What Maya files is a truthful non-finding: nine athletes can't yet distinguish the team from the campus.

And the fork is permanent equipment now: \(\sigma\) genuinely known → \(z\) at any \(n\); \(\sigma\) estimated from data → \(t\) at any \(n\), melting into \(z\) as samples grow.

Next on the desk: a reader asks not about hours but about a fraction"what percentage of students pull all-nighters?" A yes/no answer per student, a sample proportion… and a familiar recipe with one more new yardstick. That's next class.

Vote counts on today's slides are simulated for rehearsal; live sessions show the room's real votes.