Historical Context & Motivation
Throughout history, scientists and mathematicians have faced a recurring challenge: when data from the real world can be described by more than one equation, how do you decide which equation to trust? The practice of model comparison emerged from this very question. Early astronomers debated whether planetary orbits were circular or elliptical; economists argued over whether markets grew linearly or exponentially; and biologists questioned whether populations leveled off or kept climbing. In every case, the answer came down to comparing candidate models against the data and deciding which one fit better while still making sense in the real world.
The central question this lesson addresses is straightforward but powerful: when you have two (or more) mathematical models that each attempt to describe the same situation, how do you determine which model is better, and how do you justify your choice? The answer requires both numerical analysis (fit) and human judgment (reasonableness).
Core Principles of Model Comparison
Comparing models isn't just about picking the curve that looks closest to the data. A rigorous comparison rests on several foundational ideas that balance mathematical precision with practical thinking. Before diving into calculations, it helps to understand the principles that guide every model comparison.
Goodness of Fit
Residual Analysis
Reasonableness
Parsimony (Simplicity)
Domain Appropriateness
Visualizing Two Models on the Same Data
The most intuitive way to compare models is to plot them on the same set of axes alongside the data. The diagram below shows a set of data points representing the population of a small town over ten years. Two candidate models—a linear model and a quadratic model—are overlaid so you can visually assess which one tracks the data more closely.
Looking at the diagram, you can see that both models capture the general upward trend, but the quadratic curve hugs the data points more tightly, especially in years 7 through 10 where the population growth appears to accelerate. The linear model consistently under-predicts in the later years, which suggests that the relationship between time and population is not perfectly linear. Visual inspection is a powerful first step, but we need numerical tools to make a definitive comparison.
Mathematical Framework for Comparing Models
Visual inspection gives you intuition, but numbers give you evidence. The two primary tools for quantifying model fit are residuals and the coefficient of determination (R²). Together, they let you make an objective, defensible argument about which model is superior.
An R² of 0.95, for example, means the model accounts for 95% of the variation in the data. If one model has R² = 0.92 and another has R² = 0.98 for the same data set, the second model fits better—at least numerically. However, R² alone is not enough. You must also examine whether the residuals show a pattern. If the residual plot reveals a clear curve, the model is systematically missing something, regardless of how high R² might be.
Residual Plots — The Detective's Tool
A residual plot graphs the residuals (vertical axis) against the independent variable or the predicted values (horizontal axis). The pattern you see in this plot tells you whether your model is appropriate. If the residuals scatter randomly above and below zero with no discernible pattern, the model is a good structural fit. If the residuals form a curve or a funnel, the model is missing something important.
The key insight from residual analysis is this: R² can be deceivingly high even when a model is structurally wrong. A linear model with R² = 0.94 might seem good, but if its residual plot shows a parabolic curve, a quadratic model will almost certainly be more appropriate. Always check the residual plot before declaring a winner.
- Random scatter around zero → the model type is appropriate.
- U-shaped or curved pattern → try a higher-degree polynomial or a different function family.
- Fan or funnel shape → the variability changes with the data, suggesting a transformation (like logarithmic) may help.
- One or two extreme outliers → investigate those data points; they may be errors or special cases.
Worked Example: Choosing Between Linear and Exponential Models
A scientist records the number of bacteria (in thousands) in a petri dish every hour. She fits two models to the data: a linear model ŷ = 3.2x + 5 (R² = 0.91) and an exponential model ŷ = 5 × 1.45ˣ (R² = 0.99). The data for hours 0 through 6 are: 5, 7.5, 10.5, 15, 22, 31, 46. Which model should she use?
Strengths and Limitations of Common Model Types
Not every model type is appropriate for every situation. Understanding the built-in assumptions and behaviors of common model families helps you narrow down candidates before you even look at R² or residuals. The table below summarizes when each model type shines and when it falls short.
| Model Type | Best Used When… | Limitations |
|---|---|---|
| Linear (y = mx + b) | Data shows a constant rate of change; the scatter plot forms a roughly straight pattern. | Cannot capture acceleration, deceleration, or leveling off. Poor for long-range predictions when growth is non-constant. |
| Quadratic (y = ax² + bx + c) | Data has one turning point (a maximum or minimum), such as projectile height or profit optimization. | Predicts values going to ±∞ in both directions, which is unrealistic for many real situations. |
| Exponential (y = a × bˣ) | Data grows (or decays) by a constant percentage each period; multiplicative processes like population growth or radioactive decay. | Predicts unlimited growth or decay, which eventually breaks down when resources are limited. |
| Logarithmic (y = a + b ln x) | Data rises quickly at first and then levels off; diminishing returns situations. | Only defined for positive x values. Can under-predict if the leveling off is temporary. |
| Logistic (y = L / (1 + e⁻ᵏ⁽ˣ⁻ˣ⁰⁾)) | Data shows S-shaped growth with a carrying capacity; spread of diseases, adoption of technology. | Requires estimating three parameters (L, k, x₀), which can be difficult with limited data. |
Looking Ahead — Advanced Model Comparison Tools
In this course, R², SSR, residual plots, and reasonableness checks are your primary comparison tools. But as you advance in statistics and data science, you will encounter more sophisticated methods that build on these same ideas. The table below shows how the tools you're learning now connect to what comes next.
| What You Use Now | Advanced Version | What It Adds |
|---|---|---|
| R² (coefficient of determination) | Adjusted R² | Penalizes adding unnecessary variables, preventing overfitting when comparing models with different numbers of parameters. |
| Visual residual plots | Formal residual tests (Durbin-Watson, Breusch-Pagan) | Provides statistical p-values to determine if patterns in residuals are significant rather than just visual impressions. |
| Reasonableness check | Cross-validation | Tests the model on data it hasn't seen yet, revealing whether it generalizes or just memorizes the training data. |
| SSR comparison | AIC / BIC (Information Criteria) | Balances fit quality against model complexity using information theory—lower is better. |
The core philosophy never changes: a good model should fit the data, be structurally appropriate, and remain useful for prediction. The advanced tools simply automate and quantify what you are already doing by hand—checking fit, checking patterns, and checking reasonableness. Mastering the fundamentals now will make these advanced techniques feel like natural extensions rather than completely new concepts.
Practice Problems
Lesson Summary
Comparing mathematical models requires both numerical evidence and real-world judgment. Start by calculating residuals (eᵢ = yᵢ − ŷᵢ) for each candidate model and computing the sum of squared residuals (SSR) to quantify overall error. Use the coefficient of determination (R²) to measure how much variation each model explains—values closer to 1 indicate a stronger fit. But never stop at R² alone: examine the residual plot to check whether errors are randomly scattered (good) or form a pattern (bad, suggesting the wrong model type).
Beyond fit statistics, always assess reasonableness: does the model's behavior make sense for the real-world context, especially when extrapolating beyond the data? Apply the principle of parsimony by preferring simpler models when they fit comparably well, and guard against overfitting—where a complex model memorizes data noise rather than capturing the true trend. The strongest justification for choosing a model combines a high R², randomly scattered residuals, structural simplicity, and alignment with the real-world situation.