Read this lesson as text
Model Comparison Examples
Mathematical Modeling · Axiom Academy
EXAMPLE Model Comparison Examples Worked examples demonstrating how to compare and select between competing models Goal: Compare polynomial models for predicting house prices based on square footage. Data: We have n = 20 observations of house prices (in 1000s) and square footage. Question: Should we use a linear, quadratic, or cubic model? We'll see why R-squared alone can be misleading. Model 1: Linear (1 parameter + intercept) Parameters: 2 (intercept + slope) Model 2: Quadratic (2 parameters + intercept) Parameters: 3 (intercept + linear + quadratic) Model 3: Cubic (3 parameters + intercept) Parameters: 4 (intercept + linear + quadratic + cubic) Fit each model using least squares regression Calculate residual sum of squares (RSS) for each model Compute R-squared: R^2 = 1 - RSS/TSS where TSS is total sum of squares Compute Adjusted R-squared which penalizes for added parameters Best Model: Despite the cubic model having the highest R-squared (0.9739), the linear model wins with the highest adjusted R-squared (0.9693). The relationship between square footage and price is essentially linear in this range. Adding polynomial terms captures noise rather than true structure, reducing predictive accuracy on new data. If we added a 10th-degree polynomial term to the model, what would happen to R-squared and Adjusted R-squared? Goal: Select the best model for bacterial growth data using the Akaike Information Criterion (AIC).
This is the written version of the interactive lesson above. See the full Mathematical Modeling course.