Historical Context & Motivation
Humans have always looked for patterns in numbers. Long before graphing calculators and spreadsheets, scientists and mathematicians struggled with a fundamental question: given a set of observations, what equation best describes the pattern? The story of curve fitting — finding a mathematical model that closely matches collected data — stretches back centuries and is one of the most practically useful ideas in all of mathematics.
The core question this lesson addresses is deceptively simple: when you have a table of data points, how do you find the equation that best describes the pattern, and — just as importantly — what do the numbers in that equation actually mean in real life? Technology handles the computational heavy lifting, but interpreting the result is where your mathematical reasoning comes in.
Core Principles & Definitions
Before you use any technology to fit a model, you need a clear vocabulary and a set of guiding ideas. The concepts below form the foundation of data modeling and will appear repeatedly throughout this lesson.
Model
Parameters
Residuals
Correlation Coefficient (r or R²)
Constraints / Domain
Visual Explanation — Scatter Plot & Best-Fit Line
The diagram below shows a scatter plot of data points along with a best-fit line. The vertical dashed segments between each data point and the line represent the residuals. When technology runs a regression, it finds the line that makes the sum of the squared residuals as small as possible.
Notice how the data points don't all sit perfectly on the line — real data is rarely perfect. The best-fit line represents the overall trend. Points above the line have positive residuals, and points below the line have negative residuals. A good model keeps these residuals small and randomly scattered, with no obvious pattern left over.
Mathematical Framework
Different datasets call for different types of models. Here are the three most common model families you will encounter, along with their equations and parameter meanings.
When you use a graphing calculator, Desmos, or a spreadsheet to perform a regression, the technology applies the least-squares method behind the scenes. It tests millions of possible parameter values and returns the combination that produces the smallest total squared error. Your job is to choose the right model family by looking at the shape of the scatter plot, then interpret the parameters the technology gives you.
Choosing the Right Model — A Visual Guide
One of the most important skills in data modeling is selecting the correct type of equation before running a regression. The shape of the scatter plot is your primary clue. The diagram below shows the three major scatter plot shapes and the model type each suggests.
After choosing a model family, you use technology to perform the regression. In Desmos, you type your data as a table, then type an equation like y₁ ~ mx₁ + b, and the tool fills in the optimal values of m and b automatically. In a TI-84 calculator, you enter data into lists, then run LinReg, QuadReg, or ExpReg from the STAT → CALC menu. Spreadsheet tools like Google Sheets or Excel offer the LINEST function or trendline features. Regardless of the tool, the workflow is the same: enter data, choose a model type, and let the technology compute the best-fit parameters.
y₁ ~ a · b^x₁ for exponential regression. Desmos will display the values of a and b along with the R² value. You can also type y₁ ~ ax₁² + bx₁ + c for quadratic regression.Worked Example — Coffee Cooling
A student measures the temperature of a cup of coffee every 5 minutes after pouring it. The data is shown below. We will fit an exponential model, interpret the parameters, and discuss the constraints.
| Time (min) | Temperature (°F) |
|---|---|
| 0 | 180 |
| 5 | 156 |
| 10 | 137 |
| 15 | 121 |
| 20 | 109 |
| 25 | 99 |
| 30 | 92 |
y₁ ~ a · b^x₁. The tool returns the best-fit parameters.Strengths & Limitations of Fitted Models
Fitted models are powerful tools, but they are not perfect mirrors of reality. Understanding what a model can and cannot do is just as important as being able to compute one. The table below summarizes the key strengths and limitations.
| Strengths | Limitations |
|---|---|
| Provides a concise equation to summarize the trend in a large dataset. | A high R² does not prove causation — correlation and causation are different. |
| Allows predictions (interpolation) within the range of the data. | Extrapolation (predicting far beyond the data range) can give wildly inaccurate results. |
| Parameters have interpretable real-world meanings (rate of change, initial value, etc.). | Choosing the wrong model type (e.g., linear when data is exponential) produces misleading parameters. |
| Technology makes computation fast and accessible to anyone. | Models ignore outliers, noise, and context unless the user applies appropriate constraints. |
Connection to Advanced Modeling
The regression techniques you are learning now form the foundation for much more advanced modeling that you may encounter in college-level statistics, data science, or calculus-based courses. The table below shows how the concepts in this lesson connect to their advanced counterparts.
| This Lesson | Advanced Version |
|---|---|
| Fitting y = mx + b to a scatter plot | Multiple linear regression (several predictor variables simultaneously) |
| Choosing between linear, quadratic, and exponential models | Model selection criteria like AIC, BIC, and cross-validation in machine learning |
| R² as a measure of fit | Adjusted R², residual analysis, and hypothesis testing for significance |
| Interpreting parameters in context | Confidence intervals and p-values for each parameter in inferential statistics |
| Domain constraints on models | Piecewise models and logistic growth functions that incorporate natural limits |
For now, the key skills to master are recognizing the appropriate model type, using technology to compute the parameters, interpreting those parameters in the context of the problem, and identifying reasonable constraints on the model's domain. These skills transfer directly to AP Statistics, college-level data science, and real-world problem solving in virtually every STEM field.
Practice Problems
Lesson Summary
Fitting a model to data means choosing an appropriate equation type — linear (y = mx + b), quadratic (y = ax² + bx + c), or exponential (y = a · bˣ) — based on the shape of the scatter plot, then using technology to calculate the optimal parameters via least-squares regression. Tools like Desmos, graphing calculators, and spreadsheets handle the computation, returning the best-fit equation and R² to measure how well the model explains the data.
Interpreting the result is the most important skill. Each parameter has a real-world meaning: slopes represent rates of change, y-intercepts represent starting values, and growth factors describe percentage change per unit. Every model also has constraints — limits on the domain and range that reflect physical or logical reality. Predictions within the data range (interpolation) are generally reliable, while predictions beyond the data (extrapolation) must be treated with caution. Always ask: does my model's prediction make sense in the real world?