Why Training RSS Cannot Choose a Stopping Point
In subset selection, the fitted model changes as predictors are added or removed. A natural first measure of fit is the training residual sum of squares (RSS): the sum of squared differences between the observed responses and the fitted values on the data used to estimate the model. Smaller RSS means a closer fit to those observations.
The difficulty is that ordinary least squares has a built-in advantage for a larger model when the models are nested. A larger model can reproduce every fit available to its smaller counterpart, and it may also fit additional variation. Therefore, its training RSS cannot be greater. This makes raw training RSS useful for describing fit, but invalid as the sole rule for deciding when a subset search should stop.
For example, a regression with an intercept and predictor \(x_1\) is nested within a regression with an intercept and predictors \(x_1\) and \(x_2\). Setting the coefficient of \(x_2\) to zero in the larger model recovers the smaller model. The extra coefficient gives least squares more options; it does not force the fit to change.
The Monotonicity Result
Write \(S\) for the smaller model's column space and \(T\) for the larger model's column space, so \(S\subseteq T\). Let \(\mathbf y\) be the vector of observed responses, and let \(\hat{\mathbf y}_S\) and \(\hat{\mathbf y}_T\) be the least-squares fitted vectors. Least squares chooses, within each model's space, the fitted vector closest to \(\mathbf y\) in squared Euclidean distance.
The result follows directly from the minimization property. Since \(\hat{\mathbf y}_S\) belongs to \(S\), and \(S\) is contained in \(T\), it is also an allowable fitted vector in the larger model. The larger model minimizes squared error over a set that includes the smaller model's choice, so its minimum cannot be worse. A decomposition makes the possible reduction precise.
The difference \(\mathbf d=\hat{\mathbf y}_T-\hat{\mathbf y}_S\) lies in the larger model's space and is orthogonal to the smaller model's space. The smaller-model residual is \(\mathbf y-\hat{\mathbf y}_S=(\mathbf y-\hat{\mathbf y}_T)+\mathbf d\).
The larger-model residual \(\mathbf y-\hat{\mathbf y}_T\) is orthogonal to every vector in \(T\), including \(\mathbf d\). Thus the two terms in the smaller-model residual decomposition are orthogonal.
By the Pythagorean theorem, \(\operatorname{RSS}_S=\operatorname{RSS}_T+\|\mathbf d\|^2\). Since a squared length is nonnegative, \(\operatorname{RSS}_T\leq\operatorname{RSS}_S\).
This also explains when the decrease is strict: it occurs precisely when the added model space contributes a nonzero fitted component, so that \(\|\mathbf d\|^2>0\). If the new predictor contributes no direction beyond those already in the model, or if its available direction has no component in the residuals, the RSS may stay the same.
Worked Calculations
Worked Example: Tracking RSS Along a Nested Sequence
A hypothetical analyst observes four claim-processing times \(y=(10,6,8,16)\), in days. The analyst fits an intercept-only model, then adds predictors \(x_1\), \(x_2\), and \(x_3\) in that order. The predictor columns are \(x_1=(-1,-1,1,1)\), \(x_2=(-1,1,-1,1)\), and \(x_3=(1,-1,-1,1)\). Calculate the training RSS at each step and determine whether RSS alone identifies a stopping point.
Step 1: Intercept only. The response mean is \(\bar y=(10+6+8+16)/4=10\). The fitted values are \((10,10,10,10)\), so the residuals are \((0,-4,-2,6)\). Therefore, \(\operatorname{RSS}_0=0^2+(-4)^2+(-2)^2+6^2=56\).
Step 2: Add \(x_1\). The predictor is centered, and its squared length is \(4\). Its least-squares coefficient is \(x_1^\mathsf{T}(y-\bar y)/4=[0+4-2+6]/4=2\). The fitted values are \(10+2x_1=(8,8,12,12)\). The residuals are \((2,-2,-4,4)\), giving \(\operatorname{RSS}_1=4+4+16+16=40\).
Step 3: Add \(x_2\). The centered predictor columns are orthogonal: \(x_1^\mathsf{T}x_2=0\). The coefficient of \(x_2\) is \(x_2^\mathsf{T}(y-\bar y)/4=[0-4+2+6]/4=1\). The fitted values become \((7,9,11,13)\), the residuals are \((3,-3,-3,3)\), and \(\operatorname{RSS}_2=9+9+9+9=36\).
Step 4: Add \(x_3\). Its coefficient is \(x_3^\mathsf{T}(y-\bar y)/4=[0+4+2+6]/4=3\). The fitted values are now \((10,6,8,16)\), exactly the observed responses, so \(\operatorname{RSS}_3=0\).
The sequence is \(56,40,36,0\), which never increases. It reaches zero only after all three predictors are included. Method and trap avoided: compare least-squares fits on the same four observations and recognize the nested sequence. Choosing the final model merely because its training RSS is smallest would select it automatically; the calculation alone does not establish that the extra predictors are useful beyond these observations.
Worked Example: Calculating the Reduction From One Predictor
For five hypothetical policy records, an intercept-only model has response mean \(5\) and residual vector \(\mathbf e=(1,-1,0,0,0)\). A proposed added predictor has values \(\mathbf z=(1,-1,1,-1,0)\). Verify that it can be added to the intercept, calculate the new RSS, and identify a common arithmetic error.
Step 1: Check centering and the starting RSS. The entries of \(\mathbf z\) sum to zero, so it is orthogonal to the intercept column. The starting RSS is \(\mathbf e^\mathsf{T}\mathbf e=1+1=2\). The added predictor is nonzero, with \(\mathbf z^\mathsf{T}\mathbf z=1+1+1+1=4\).
Step 2: Find its fitted coefficient. With the intercept already fitted, the coefficient is the residual's projection onto \(\mathbf z\): $$ \hat\beta_z=\frac{\mathbf e^\mathsf{T}\mathbf z}{\mathbf z^\mathsf{T}\mathbf z} =\frac{1+1}{4}=\frac12. $$
Step 3: Calculate the new fit and RSS. The fitted adjustment is \(\hat\beta_z\mathbf z=(1/2,-1/2,1/2,-1/2,0)\). The new residual vector is \((1/2,-1/2,-1/2,1/2,0)\), so its RSS is \(1/4+1/4+1/4+1/4=1\). The RSS has decreased from \(2\) to \(1\).
The reduction is also \((\mathbf e^\mathsf{T}\mathbf z)^2/(\mathbf z^\mathsf{T}\mathbf z)=2^2/4=1\). Common mistake: subtracting \(2/4\) instead of \(2^2/4\), which would incorrectly give an RSS of \(1.5\). The projection amount is squared because RSS is a squared length. The direct residual calculation checks the answer: its four nonzero residuals each have squared value \(1/4\), totaling \(1\).
Worked Example: A Full-Rank Model With Zero Training RSS
A hypothetical data set has three response values \(y=(2,3,6)\). Consider the intercept-only model, then add \(x_1=(-1,0,1)\), and finally add \(x_2=(1,-2,1)\). Calculate the RSS at each stage and explain the final result.
Step 1: Intercept only. The mean is \(\bar y=11/3\). The residuals are \((-5/3,-2/3,7/3)\), so $$ \operatorname{RSS}_0=\frac{25+4+49}{9}=\frac{78}{9}=\frac{26}{3}. $$
Step 2: Add \(x_1\). Since \(x_1\) is centered, its squared length is \(2\), and its coefficient is \(\{(-1)(-5/3)+(1)(7/3)\}/2=4/2=2\). The fitted values are \((5/3,11/3,17/3)\), leaving residuals \((1/3,-2/3,1/3)\). Thus \(\operatorname{RSS}_1=(1+4+1)/9=2/3\).
Step 3: Add \(x_2\). This predictor is centered and orthogonal to \(x_1\), because \(1+(-2)+1=0\) and \((-1)(1)+0(-2)+(1)(1)=0\). Its coefficient is the residual projection \(\{1/3+4/3+1/3\}/6=2/6=1/3\), since \(x_2^\mathsf{T}x_2=1+4+1=6\). Adding \((1/3)x_2\) to the fitted values gives \((2,3,6)\), so \(\operatorname{RSS}_2=0\).
The final model has three independent columns—the intercept and the two predictors—for three observations, and it fits this data exactly. Method and trap avoided: verify the fitted values and design rank rather than treating zero training RSS as proof of a generally successful model. Exact fit here is a consequence of having enough independent coefficients to reproduce these three values; it is not, by itself, evidence about performance on new observations.
Why Raw RSS Alone Is an Invalid Stopping Rule
For a nested sequence of ordinary least-squares models, raw training RSS is a one-way measure: it can decrease or remain unchanged as terms are added, but cannot increase. Consequently, if the only objective is to find the smallest training RSS, there is no reason under that objective to stop before the largest model being considered. In subset search, the same issue appears when comparing the best available fits at successive sizes: an available larger model can retain the smaller fit and has additional options.
That conclusion does not mean every larger model must have a strictly smaller RSS. A predictor may be redundant, or it may have zero partial association with the current residuals. Nor does the result compare every pair of models with different predictor sets: if neither model contains the other's fitting space, there is no nesting guarantee that one RSS must be smaller. The result applies to nested models fitted to the same observations using the same least-squares objective.
A common exam trap is to write “the larger model has a lower RSS, therefore it is preferred.” The first clause may be correct, but it does not justify the second: raw training RSS rewards added flexibility whether or not the added terms will be useful outside the training sample. A stopping or selection decision must account for model size or assess performance using an appropriate broader criterion; the unadjusted training RSS by itself supplies no such balance.
Check Your Understanding
For each problem, use the nested-model result and show the relevant calculation before checking the final answer.
- A smaller model has training RSS \(48\). A nested larger model is fitted by ordinary least squares to the same observations. What range of values can its RSS take, and must it be strictly below \(48\)? (Answer: \(0\leq\operatorname{RSS}_{\text{large}}\leq48\); no, it may equal \(48\).)
- A current model has RSS \(30\). For a proposed predictor after removing its projection onto the current model's columns, the residualized predictor satisfies \(\mathbf e^\mathsf{T}\mathbf z=6\) and \(\mathbf z^\mathsf{T}\mathbf z=3\). Find the new RSS, assuming \(\mathbf z\neq\mathbf0\). (Answer: \(18\), since the reduction is \(6^2/3=12\).)
- Along a nested search path, the RSS values are \(90,72,72\) after successive additions. Does the equality at the last step prove that every further nested addition must also leave RSS unchanged? Explain. (Answer: No; it shows only that this addition did not reduce RSS. A later added direction can reduce it.)
- A data set has six observations and a regression model with an intercept and five predictor columns. The six design columns are linearly independent. What is the training RSS of the least-squares fit, and why does that not justify choosing it solely by raw RSS? (Answer: \(0\); the full-rank square design can fit all six responses exactly, but zero training RSS alone does not justify selecting the model.)