The cheat sheet
Use this as a reference after working through an example. For a question that feels unreadable, start with a notation walkthrough.
Identify the objects
Section titled “Identify the objects”| symbol | meaning | example |
|---|---|---|
| , | random input; a particular input | a campaign; its measured spend |
| , | feature j | TV spend within one input |
| training row i | that campaign’s spend and sales | |
| p, N | number of features; number of examples | 3 features, 200 campaigns |
| true conditional mean | ||
| prediction from a model fitted on D | changes if you train on different data | |
| output minus conditional mean | ||
| conditional output variance | constant in our simulations | |
| , | candidate parameters; fitted parameters | intercept and slopes |
| dot product | ||
| parameter choice with the lowest score | returns parameters, not the minimum score |
What is the expectation over?
Section titled “What is the expectation over?”| expression | hold fixed | average over |
|---|---|---|
| input x | possible outputs at x | |
| input and training method | training datasets D | |
| prediction rule g | new input–output pairs | |
| fitted model and held-out dataset | the finite list of observed errors |
Definitions and assumptions
Section titled “Definitions and assumptions”Define and . Then by definition (when the conditional mean exists).
Constant conditional variance, , is an extra assumption. Independent noise is stronger: fixing X leaves its entire distribution unchanged. The examples use independent, constant-variance noise; the conditional-mean result does not require those simplifications.
Squared loss: the three related results
Section titled “Squared loss: the three related results”For one prediction c, assuming finite second moments:
The best c is the mean. Absolute loss instead selects a median.
For a fixed predictor h at a fixed input x:
For a training method repeated across datasets, scored on an independent fresh output at x:
For overall expected error, average over inputs too. A finite test-set MSE is an estimate of one fitted model’s performance; it is not exactly this population decomposition.
Choosing and assessing a model
Section titled “Choosing and assessing a model”- Fit parameter values on training data.
- Use validation data or cross-validation to choose degree, regularization, or model family.
- Assess the frozen choice on separate test data.
Minimum unpenalized training error cannot increase when the candidate families are nested and the same objective is minimized on the same data. A U-shaped expected-error curve is a classical example, not a universal law.
More data often stabilizes fitted predictions. It does not let a straight line represent arbitrary curvature. The bias of an estimator can also depend on sample size.
Neighbors in p dimensions
Section titled “Neighbors in p dimensions”For uniform points in a unit-radius ball and a radius-r ball at its center, with 0≤r≤1:
To get k expected neighbors, . For N=1,000 and k=10, r is about 0.63 in ten dimensions. That is 63% of the radius but 1% of the volume. Boundary effects, nonuniform sampling, and lower-dimensional structure change this calculation.
For a unit ball inside a cube of side 2, the fraction of cube volume is
Frequent distinctions
Section titled “Frequent distinctions”Output variance versus prediction variance
Output variance describes the possible Y values at one x. Prediction variance describes the predictions from repeatedly trained models at that same x. More training examples can reduce the second while the first stays unchanged.
Can a measured error be below the noise floor?
Yes. The floor bounds expected squared error using the specified inputs. A finite sample can have unusually small noise; training also adapts the model to its particular sample. A low training score alone does not diagnose overfitting.
Is irreducible error permanently irreducible?
It is relative to the measured inputs. A useful additional feature can explain variation that was previously noise. That may reduce conditional output variance, while also making estimation more demanding with a finite sample.