Foundations — Bias-variance tradeoff
Before you can read a single line of the parent note, you need to own every symbol it throws at you. This page builds each one from nothing — plain words, a picture, and the reason the topic can't live without it. Read top to bottom; nothing here uses a symbol before it is earned.
1. A function — the hidden truth
Picture a conveyor belt. Every input that rides in comes out transformed into . In this topic, is the true, hidden rule that generated your data — the perfect answer nature is using but never shows you.
Look at the yellow curve above: that is , the true rule used in the parent's Example 1. You never get to see this curve directly. All you ever receive are dots scattered near it — and even those dots are nudged off the curve by noise (next section).
Recall
What does mean in the bias-variance story? ::: The true, hidden function that generated the data — the perfect answer we are trying to recover but can never observe directly.
2. Noise and the data equation
Why do we need it? Because real measurements are never clean. A sensor flickers, a survey answer is fuzzy, a coin lands unpredictably. So the value you actually record is the true value plus a random bump:
- (read "why") = the number you actually see in your dataset.
- = where the truth says it should be.
- = the random shove up or down.
The red dots are the values. Each red dot sits near the yellow truth curve but is knocked off by its own — some up, some down.
3. Expectation — the "average over all possible worlds"
This is the most important and most confusing symbol in the whole topic. Slow down here.
Picture rolling a fair die. Any single roll is 1–6, unpredictable. But : the average you converge to over millions of rolls. You never see 3.5 on the die — it is the average of a random thing.
The little subscript tells you which random thing you are averaging over:
Recall
In plain words, what is ? ::: The long-run average of a random quantity if you repeated the experiment infinitely many times.
4. Training dataset — one draw of dots
Picture reaching into a jar of infinitely many possible datasets and pulling out one handful of dots. That handful is . If you reach in again, the noise on each point is different, so you pull out a different handful — a different .
Above are three different draws of from the same truth. Same underlying yellow curve, different red dots each time. This "many possible datasets" idea is the engine behind and the whole notion of variance: your model would be trained on just one of these, but its behaviour is judged across all of them.
Why does the topic need ? Because bias and variance are questions about what happens if you had gotten a different dataset — and is the symbol for "the dataset you happened to get." Link forward: how you slice into pieces to estimate error is the job of Train-Validation-Test Split and Cross-Validation.
5. The estimator — your model's guess
So:
- = truth (unknown, no hat).
- = your model's prediction at (built from , wears a hat).
Because is trained on a random , it is itself random: train on a different handful of dots, get a different curve. That is why we can talk about (its average curve) and how much it scatters.
How wiggly is allowed to be — a straight line vs. a degree-9 polynomial — is exactly Model Capacity. More capacity can lower bias but raises variance, which is the Overfitting and Underfitting story.
6. Squaring and — why errors get squared
The parent measures error with . Why square it?
The parabola shows it: whether you miss left or right, squaring lifts the penalty above zero, and the penalty grows steeply for large misses.
7. Variance — average squared scatter
Read it inside-out:
- — the average value (the center).
- — how far this particular draw sits from the center.
- square it (section 6) so ups and downs don't cancel.
- — average that squared distance over all draws.
Apply it to a model: asks "across all the different datasets I might have trained on, how much does my prediction at jump around?" That is precisely the "variance" pillar of the decomposition.
The constant (read "sigma squared") in the parent is just the variance of the noise: . It is the irreducible floor — you cannot out-model random noise. See it shrink with cleaner data or grow with messy data; Learning Curves make this floor visible.
8. Bias — the steady, systematic miss
Notice both symbols are now earned: is the average model (section 3–5), is truth (section 1). Their difference is a steady error that stays even after averaging away all the scatter — a rule that is simply the wrong shape (a straight line trying to be a sine wave). Fighting bias with penalties is the surprising twist in Regularization Techniques and Ensemble Methods.
Prerequisite map
Every arrow says "you must understand the tail before the head." The three streams — truth-and-noise, expectation-and-scatter, dataset-and-model — all converge on the tradeoff itself.
Equipment checklist
Cover the right side and answer out loud. If any fails, reread that section.