← Back to Modules Directory

Module 08 - Sum of Squares Framework (TSS, ESS, RSS, R²)

This study reference details the Analysis of Variance (ANOVA) sum of squares decomposition framework used to evaluate ordinary least squares (OLS) regression models. It maps out how total target variability splits into explained and unexplained components, providing the mathematical basis for coefficients of determination.

1. The ANOVA Sum of Squares Decomposition

To evaluate how well a regression line tracks empirical data, the total variation in the dependent target variable is broken down into three component elements:

Total Sum of Squares (TSS)

Measures the baseline total variability present within the dependent target variable. It calculates the sum of the squared differences between each raw observed data point and the general mean of the dependent variable. Graphically, this captures the total variation of the observed values around a horizontal intercept line mapping the target average.

TSS = Σ(y_actual - y_mean)²
Explained Sum of Squares (ESS)

Measures the portion of target variability that is successfully captured and explained by the independent predictor features. It aggregates the sum of the squared differences between the model's predicted values and the baseline mean of the dependent variable. Graphically, this displays the variance of the regression line values around the target average.

ESS = Σ(y_predicted - y_mean)²
Residual Sum of Squares (RSS)

Also known as the Sum of Squared Errors (SSE), this parameter measures the remaining variability in the dependent variable that the model fails to explain. It calculates the sum of the squared differences between the raw observed values and the model's matching predicted coordinates. Graphically, this represents the scatter of observed data points directly around the optimized line of best fit.

RSS = Σ(y_actual - y_predicted)²

These components fit together in a strict additive framework representing total model variance:

TSS = ESS + RSS

2. Correlation vs. Determination Indices

3. Model Parsimony & Out-of-Sample Performance

4. Key Structural Cautions