The bias-variance decomposition splits expected squared test error into three terms:
EGE=Bias2+Var+σ2. Assume the true relation
y=f∗(x)+ϵ with
E[ϵ]=0,
Var(ϵ)=σ2, and
ϵ independent of the input; the model
f^ is fit on a random training set
D, and
fˉ(x)=ED[f^(x)]. Full proof (for fixed
x): rewrite
y−f^=ϵ+(f∗−f^) and expand:
E[(y−f^)2]=E[ϵ2]+2E[ϵ(f∗−f^)]+E[(f∗−f^)2]. The cross term vanishes because
ϵ is independent of the training set
D (hence of
f^) and
E[ϵ]=0:
2E[ϵ(f∗−f^)]=2E[ϵ]E[f∗−f^]=0. For the third term, write
f∗−f^=(f∗−fˉ)+(fˉ−f^); under
ED the cross term
2(f∗−fˉ)ED[fˉ−f^]=2(f∗−fˉ)(fˉ−fˉ)=0, so
ED[(f∗−f^)2]=(f∗−fˉ)2+ED[(f^−fˉ)2]=Bias2+Var. Combining:
EGE=Bias2+Var+σ2, where
σ2 is irreducible noise that no model can remove.