This tool refits a polynomial to a fresh random sample every time you click "Draw Sample," so you can watch low-degree fits stay stable but miss the curve while high-degree fits chase the noise instead. Bias, variance, and the resulting mean squared error update from the accumulated draws, letting you see the tradeoff build up sample by sample rather than take it on faith.
The true relationship between x and y is a quadratic function (degree 2) plus random noise. You don't know this — you only observe noisy samples of 20 points. Each time you click "Draw Sample", a fresh sample of 20 points is generated and a polynomial of your chosen degree is fit to it. By drawing many samples, you can see how the fitted model behaves across repeated experiments.
Bias = how far the average prediction is from the truth (systematic error). Variance = how much predictions scatter across different samples (instability). A simple model (degree 0 or 1) is stable but consistently wrong — high bias. A complex model (degree 3 or 4) has extra parameters and changes more between samples — high variance.