Two regression models f1 and f2 are combined as y^=wf1(x)+(1−w)f2(x). Assume both are unbiased, their errors e1=f1(x)−y and e2=f2(x)−y have variances σ12 and σ22, and Cov⁡(e1,e2)=ρσ1σ2, where ρ is the correlation of the errors. Which w minimises the variance of the combined error, and what is that minimum variance?

Supervised learning, Ensembles
Level L3 Intermediate. Length Medium. Nature Mat Mathematical.

What's being asked

Whether you can write the variance of a weighted sum of correlated errors and minimise a quadratic in one variable.

Key idea

The combined error is e=we1+(1−w)e2. It is still unbiased, and Var⁡(e)=w2σ12+(1−w)2σ22+2w(1−w)ρσ1σ2. Setting the derivative to zero gives w∗=σ22−ρσ1σ2σ12+σ22−2ρσ1σ2.

Steps

  1. Write the combined error. Since the weights w and 1−w add up to 1, y^−y=we1+(1−w)e2. Both errors have mean 0 (the models are unbiased), so the combined error has mean 0 and its mean squared error equals its variance.
  2. Use Var⁡(aX+bY)=a2Var⁡(X)+b2Var⁡(Y)+2abCov⁡(X,Y): V(w)=w2σ12+(1−w)2σ22+2w(1−w)ρσ1σ2.
  3. Differentiate and set to zero: V′(w)=2wσ12−2(1−w)σ22+2(1−2w)ρσ1σ2=0. Collect the w terms: w(σ12+σ22−2ρσ1σ2)=σ22−ρσ1σ2, which gives w∗.
  4. Check it is a minimum: V′′(w)=2(σ12+σ22−2ρσ1σ2)=2Var⁡(e1−e2), which is positive unless the two errors are identical.
  5. Substitute back to get the minimum: V(w∗)=σ12σ22(1−ρ2)σ12+σ22−2ρσ1σ2. It is never larger than min⁡(σ12,σ22), because w=0 and w=1 are among the choices.
  6. Sanity checks. With ρ=0: w∗=σ22σ12+σ22, so the less noisy model gets more weight. With σ1=σ2=σ: w∗=12 and V=σ21+ρ2, so the less correlated the models, the bigger the gain.

Common mistakes

How long your answer should be

Half a page; about 5 minutes.

Last checked on 4 December 2026.

Read this

Previous in Supervised learning: A linear support vector regression (SVR) with an ε-insensitive loss, ε=0.5 and C=2, is trained on five points (x,y) and learns f(x)=x (so w=1, b=0). The points are A=(0,0.1), B=(1,1.5), C=(2,1.5), D=(3,1.8) and E=(4,5.0). Using the dual variables, which points are support vectors, and which have zero training loss?
Next in Supervised learning: A binary classification training set has 64 one-dimensional samples, 32 from each class, and all 64 values of x are distinct. A decision tree splits with thresholds x≤θ and keeps splitting until every leaf is pure. Justify each answer. (a) What is the maximum possible training accuracy? (b) What is the maximum possible depth of the tree? (c) What is the minimum possible depth? (d) Does the minimum-depth tree need regularisation?