MATH 3 • MODELING & APPLICATIONS

Fitting Models to Data — I can fit a model to data (with technology) and interpret parameters and constraints in context.

Learn how to use technology to find the best mathematical model for real-world data and explain what the numbers mean.

Historical Context & Motivation

Humans have been collecting data for thousands of years — counting harvests, tracking star positions, and recording trade numbers. But raw data by itself is just a pile of numbers. The real power comes when you find a mathematical model — a function or equation — that captures the pattern in the data. Once you have a model, you can make predictions, test theories, and understand the forces driving the numbers.

For centuries, fitting a model to data meant hours of hand calculations. Mathematicians would plot points on graph paper, draw curves by eye, and tweak equations until they looked right. The development of least-squares regression in the early 1800s was a game-changer, but even that method required tedious arithmetic. Today, graphing calculators and software like Desmos, GeoGebra, and spreadsheets can fit a model in seconds — letting you focus on interpretation rather than computation.

1805
Legendre Publishes Least Squares
French mathematician Adrien-Marie Legendre introduced the method of least squares, a systematic way to minimize the total error between a curve and a set of data points.
1809
Gauss Refines the Method
Carl Friedrich Gauss showed he had been using least squares even earlier and connected it to probability theory, giving the method a solid mathematical foundation.
1886
Galton Introduces Regression
Francis Galton coined the term regression while studying hereditary traits, laying groundwork for modern statistical modeling.
1970s
Pocket Calculators Arrive
Scientific and graphing calculators made regression accessible to students and engineers, automating curve-fitting computations that once took hours.
2010s
Free Online Tools Democratize Modeling
Platforms like Desmos, GeoGebra, and Google Sheets put powerful regression tools in every student's hands, enabling real-time exploration of data models.

The central question this lesson addresses is: Given a set of real-world data, how do I choose and fit the right model using technology, and what do the resulting parameters actually mean in context?

Core Principles & Definitions

Before jumping into technology, you need to understand the key ideas behind model fitting. A regression model is an equation whose parameters (coefficients, bases, constants) are chosen so the curve passes as close to the data points as possible. The fit is never perfect — there is always some residual error — but the goal is to make that error as small as possible while still using a model type that makes sense for the situation.

1

Parameter

A number in the model equation that the technology calculates to best fit the data. In y = mx + b, the parameters are m (slope) and b (y-intercept). Each parameter has a real-world interpretation.
2

Residual

The difference between an observed data value and the value the model predicts. Residual = observed − predicted. A good model keeps residuals small and randomly scattered.
3

Coefficient of Determination (R²)

A number from 0 to 1 that measures how well the model explains the variation in the data. An R² close to 1 means the model captures nearly all the pattern; close to 0 means the model is a poor fit.
4

Domain Constraints

Real-world restrictions on the input variable. For example, time cannot be negative, and a population cannot exceed the environment's carrying capacity. Models are only valid within sensible constraints.
5

Model Type

The family of function you choose — linear, quadratic, exponential, logarithmic, or power. The shape of the scatter plot and the context of the problem guide your choice.
KEY TAKEAWAY
Think of fitting a model like adjusting the lens on a camera. The data is the scene in front of you, and the parameters are the focus and zoom knobs. Technology turns those knobs automatically until the picture is as sharp as possible. But you still have to decide which lens (model type) to use — a wide-angle lens for a landscape won't work for a close-up portrait, just like a linear model won't capture exponential growth.

Visual Explanation — Scatter Plot & Regression Curve

The diagram below shows a set of data points (circles) and three candidate models fitted to them. Notice how the exponential curve follows the upward bend of the data much more closely than the straight line. The residuals — the vertical distances from each point to the curve — are smallest for the exponential model, which is why its R² value is highest.

This scatter plot displays nine data points (purple circles) with three models overlaid: a linear model (dashed amber), an exponential model (solid cyan), and a quadratic model (dashed pink). The exponential model has the highest R², meaning it fits the data most closely.

When choosing a model, always start by looking at the shape of the scatter plot. If the data curves upward with increasing steepness, an exponential or power model is usually the right call. If the data rises, peaks, and falls, a quadratic model is a better candidate. A roughly straight pattern calls for a linear model. Technology can fit any model type you tell it to, but a high R² doesn't automatically mean the model makes sense — context matters just as much as the number.

Mathematical Framework

Each model type has a general equation with parameters that technology solves for. Below are the four most common regression families you will encounter in Math 3, along with the meaning of each parameter.

LINEAR MODEL
y = mx + b
m = slope (rate of change per unit of x); b = y-intercept (starting value when x = 0). Use when data shows a constant rate of increase or decrease.
QUADRATIC MODEL
y = ax² + bx + c
a = controls the opening direction and width of the parabola; b = shifts the vertex horizontally; c = y-intercept. Use when data rises and then falls (or vice versa).
EXPONENTIAL MODEL
y = a · bˣ
a = initial value (y when x = 0); b = growth factor (b > 1 means growth, 0 < b < 1 means decay). The growth rate r = b − 1. Use when data increases or decreases by a constant percentage.
POWER MODEL
y = a · xⁿ
a = coefficient (vertical stretch); n = power/exponent that controls the curve shape. Use when a variable scales as a power of another, such as area versus radius.

Technology uses the least-squares method behind the scenes: it finds the parameter values that minimize the sum of the squared residuals, Σ(observed − predicted)². You do not need to perform this calculation by hand — the calculator or software handles it. Your job is to enter the data correctly, choose the right model type, and interpret what comes out.

📊 Interpreting R²
An R² of 0.95 means that 95% of the variation in the y-values is explained by the model. The remaining 5% is due to factors not captured by the equation. In general, R² > 0.9 is a strong fit for most classroom and real-world applications, but always check the residual plot too — if residuals show a curved pattern, the model type may be wrong even if R² is high.

Model Selection — Choosing the Right Fit

One of the most important skills in model fitting is knowing which model type to try before handing the data to your calculator. The scatter plot's shape gives you the first clue, but the real-world context provides the deciding evidence. The diagram below summarizes how scatter plot shapes connect to model families.

This flowchart guides you from the scatter plot's shape to the appropriate model family. Start at the top and follow the branch that best matches your data's visual pattern. Always confirm your choice with context and R².
Context clues for model selection
Clue in ContextModel to TryExample
Adds/loses a fixed amount per unit timeLinearA car travels at 60 mph — distance grows by 60 each hour.
Multiplies by a fixed percentage per unit timeExponentialBacteria double every 3 hours — population grows by ×2.
Rises to a max then falls, or vice versaQuadraticA ball thrown upward — height increases then decreases.
One quantity scales as a power of anotherPowerThe area of a circle scales as radius².

Worked Example — Modeling Population Growth

A biologist records the population of a bacteria colony every hour. The data is shown below. We will use an exponential regression to fit a model, then interpret the parameters in context.

Bacteria colony population data
Time (hours)Population (thousands)
05.0
16.2
27.8
39.6
412.1
514.9
618.7
Fitting an Exponential Model with Technology
1
Step 1 — Enter Data into TechnologyOpen Desmos, a graphing calculator, or a spreadsheet. Enter time in one list (L₁ or x-column) and population in another (L₂ or y-column). Create a scatter plot to visualize the data.
2
Step 2 — Observe the Scatter Plot ShapeThe points curve upward with increasing steepness. This pattern, combined with the biological context of population growth, strongly suggests an exponential model of the form y = a · bˣ.
3
Step 3 — Run Exponential RegressionIn Desmos, type y₁ ~ a · bˣ¹ where (x₁, y₁) is the data table. On a TI calculator, go to STAT → CALC → ExpReg. The technology returns the parameters.
a ≈ 5.02, b ≈ 1.237, R² ≈ 0.9996
4
Step 4 — Write the Model EquationSubstituting the parameters gives us:
P(t) = 5.02 × 1.237ᵗ, where P is population in thousands and t is time in hours.
5
Step 5 — Interpret Parameters in ContextThe parameter a = 5.02 means the initial population at t = 0 is about 5,020 bacteria. The parameter b = 1.237 means the population is multiplied by 1.237 each hour, which corresponds to a 23.7% growth rate per hour. The R² of 0.9996 tells us the model explains 99.96% of the variation — an excellent fit.
6
Step 6 — State Domain ConstraintsTime t must be ≥ 0 (you can't go back in time). Also, exponential growth can't continue forever in biology — resources run out. So this model is valid only for the first several hours before the colony reaches its carrying capacity. We should note: the model is valid approximately for 0 ≤ t ≤ 10 hours based on reasonable biological assumptions.

Strengths & Limitations of Regression Models

Regression models are incredibly useful, but they are not magic. Understanding their strengths and limitations will help you use them responsibly and avoid common mistakes like extrapolation beyond the range of your data.

Strengths and limitations of regression models
StrengthsLimitations
Technology makes fitting fast and precise — no tedious hand calculations.Technology will fit any model you tell it to, even if the model makes no sense in context.
R² gives a quick, objective measure of how well the model captures the data pattern.A high R² doesn't guarantee the model is appropriate — overfitting and wrong model types can still produce high R² values.
Parameters have real-world meaning (growth rate, initial value, etc.) that you can communicate to others.Extrapolating far beyond the data range can produce wildly inaccurate predictions.
Models allow you to make predictions for x-values within the data range (interpolation).Regression assumes the relationship is consistent; sudden regime changes (e.g., a pandemic) break the model.
KEY TAKEAWAY
A regression model is like a weather forecast: it is very reliable for the near future (interpolation within the data range) but becomes increasingly unreliable the further out you try to predict (extrapolation). Always state the domain constraints — the range of x-values for which the model is valid — when you present your results.

Connection to Advanced Modeling

The regression techniques you learn in Math 3 are the foundation for more powerful tools used in college and industry. Understanding where simple regression fits into the bigger picture will help you appreciate why mastering interpretation now is so important.

Math 3 regression vs. advanced modeling
Math 3 ApproachAdvanced Approach
Fit one of a few standard model types (linear, quadratic, exponential, power).Multiple regression with many predictor variables, logistic models, polynomial regression of higher degree.
Use R² to judge fit quality.Use adjusted R², AIC, BIC, cross-validation, and residual analysis for model comparison.
Interpret parameters in context by inspection.Hypothesis testing on parameters (p-values, confidence intervals) to determine statistical significance.
State domain constraints informally.Formal constraint optimization, boundary conditions, and sensitivity analysis.

In fields like data science, epidemiology, and engineering, professionals use the exact same reasoning process you are learning — identify the pattern, choose a model family, fit it with technology, and interpret the results in context. The tools get fancier, but the core thinking skill is identical. If you can explain what slope, growth factor, or vertex means in a real-world situation, you already have the mindset of a working analyst.

Practice Problems

PROBLEM 1CONCEPTUAL
A student fits both a linear and an exponential model to a data set. The linear model gives R² = 0.88 and the exponential model gives R² = 0.97. However, the data represents the height of a ball thrown straight up over time. Which model should the student use, and why?
PROBLEM 2BASIC CALCULATION
A linear regression on a set of sales data yields the model y = 3.5x + 12, where x is the number of months since January and y is the number of units sold (in hundreds). What does the slope of 3.5 mean in context? How many units does the model predict will be sold in month 8 (August)?
PROBLEM 3INTERMEDIATE
An exponential regression on radioactive decay data produces the model A(t) = 200 × 0.85ᵗ, where A is the mass in grams and t is time in days. (a) What is the initial mass? (b) What is the daily decay rate? (c) Predict the mass after 10 days. (d) State a reasonable domain constraint.
PROBLEM 4APPLIED
A city planner collects data on traffic volume (thousands of cars per day) versus distance from the city center (miles). Using technology, she obtains the power regression model V(d) = 48.3 × d⁻⁰·⁷² with R² = 0.94. (a) Interpret the exponent −0.72 in context. (b) The planner wants to predict traffic at d = 0.2 miles. Is this reasonable? (c) What constraint should she place on d?
PROBLEM 5CRITICAL THINKING
A student fits both a quadratic model (R² = 0.993) and an exponential model (R² = 0.987) to data showing a company's revenue over its first 8 years. The quadratic model predicts revenue will start declining in year 10, while the exponential model predicts it will keep growing forever. Discuss: (a) What additional information would help you decide which model is more appropriate? (b) Could both models be wrong for long-term predictions? Explain.

Lesson Summary

Fitting a model to data means using technology — such as Desmos, a graphing calculator, or a spreadsheet — to find the parameters of an equation that best match a set of data points. You begin by examining the scatter plot shape and the real-world context to choose the right model type — linear for constant rates, exponential for constant percentage change, quadratic for rise-and-fall patterns, or power for scaling relationships. Technology performs a least-squares regression to minimize the total squared error and returns the best-fit parameters along with an R² value measuring how well the model explains the data.

The most important part of model fitting is interpreting the parameters in context: a slope becomes a rate of change per unit, a base becomes a growth factor, and an intercept becomes a starting value. You must also state domain constraints — the range of input values for which the model is valid — to avoid unreliable extrapolation. A high R² alone does not guarantee a good model; the equation must also make sense in the real-world situation it describes.

Varsity Tutors • Math 3 • Fitting Models to Data