Suppose the m fold errors in cross-validation each have variance σ2 and every pair has correlation ρ. Derive the variance of their average. Evaluate it for m=10 and ρ=0.1, 0.5, 0.9 with σ2=1, and explain why this is used to argue that leave-one-out has high variance?

Foundations, Model selection
Level L3 Intermediate. Length Medium. Nature Mat Mathematical.

What's being asked

Whether you can derive the variance of an average of correlated quantities and use it to reason about how the cross-validation estimate behaves.

Key idea

For m quantities with common variance σ2 and common pairwise correlation ρ, Var⁡(1m∑jEj)=ρσ2+1−ρmσ2. As m grows the second term vanishes but ρσ2 stays. Averaging many highly correlated errors barely helps.

Steps

  1. This is the harder companion of `k-fold-cv-choosing-k`, which gives the idea in words. Write Eˉ=1m∑j=1mEj. Then Var⁡(Eˉ)=1m2∑i∑jCov⁡(Ei,Ej).
  2. Split the double sum. There are m diagonal terms, each equal to σ2, and m(m−1) off-diagonal terms, each equal to ρσ2.
  3. Add up: Var⁡(Eˉ)=mσ2+m(m−1)ρσ2m2=σ2m+(m−1)ρσ2m=ρσ2+1−ρmσ2.
  4. Evaluate with m=10, σ2=1: ρ=0.1 gives 0.1+0.09=0.19; ρ=0.5 gives 0.5+0.05=0.55; ρ=0.9 gives 0.9+0.01=0.91. With independent errors (ρ=0) it would be 0.1.
  5. Interpret. In leave-one-out, any two training sets share n−2 of their points, so the fitted models are almost the same and ρ is large. The average of n errors then behaves as if it had a few effective observations. With k=5 or 10 the training sets differ more, so ρ is smaller.
  6. Be honest about the limits. This is a simple model with equal ρ. The true correlation depends on the algorithm and the data, so it supports a rule of thumb, not a theorem. Careful studies find that no unbiased estimator of the variance of k-fold CV exists, and results differ across stable and unstable learners.

Common mistakes

How long your answer should be

Half a page; about 3 minutes, with the three-line algebra and the table of values.

Read this

Previous in Foundations: When data are missing at random (MAR), suppose an outcome Y is observed only when R=1, where the observation probability π(X)=P(R=1∣X,Y)=P(R=1∣X)>0 depends only on fully observed covariates X. Why is the unweighted complete-case sample mean biased for E[Y], and how do you prove that the inverse-probability-weighted (IPW) estimator μ^IPW=1n∑i=1nRiYiπ(Xi) is unbiased?
Next in Foundations: Derive the number of monomial features of degree at most p in d input variables, using a stars-and-bars counting argument. Check it for d=2, p=2 by listing the terms, then evaluate it for d=100, p=3 and explain why a polynomial kernel avoids building these features?