Fitting Lines
to Data
Learn to draw a line of best fit through scatter plot data and interpret the slope and y-intercept in real-world contexts.
What Is a Scatter Plot?
A scatter plot shows two numerical variables as dots on a coordinate plane. Each dot represents one data point: its horizontal position is the \(x\)-value and its vertical position is the \(y\)-value.
The Line of Best Fit
A line of best fit (or trend line) is a straight line drawn through a scatter plot that follows the overall pattern of the data. It doesn't have to pass through every point: it should have roughly equal numbers of points above and below it.
Why Fit a Line?
The Equation: \(y = mx + b\)
Every straight line can be written as \(y = mx + b\), where \(m\) is the slope and \(b\) is the y-intercept.
Interpreting Slope in Context
The slope \(m\) tells you the rate of change: for every 1-unit increase in \(x\), the value of \(y\) increases (or decreases) by \(m\) units.
Interpreting the y-Intercept
The y-intercept \(b\) is the predicted value of \(y\) when \(x = 0\). In context, it represents the starting value before any of the \(x\)-variable has been applied.
Slope vs. Intercept
| Slope \(m\) | y-Intercept \(b\) | |
|---|---|---|
| What it tells you | Rate of change | Starting value |
| Where to read it | Steepness of line | Where line crosses y-axis |
| Units | y-units per x-unit | Same units as \(y\) |
| Example | 8 points/hour | 52 points |
How to Draw a Line of Best Fit
Example 1: Plant Growth
A student measures a plant's height (cm) each week. The data: (1, 3), (2, 5), (3, 6), (4, 8), (5, 11), (6, 12).
Example 2: Lemonade Sales
A lemonade stand tracked daily temperature (°F) and cups sold:
Example 3: Making a Prediction
Using the lemonade model \(y = 1.1x - 63\), predict cups sold on a 88 °F day.
Positive, Negative, or No Trend?
Interpolation vs. Extrapolation
Common Mistakes
Quick Reference Summary
| Concept | Symbol | Meaning |
|---|---|---|
| Equation of a line | \(y = mx + b\) | Predicts \(y\) from \(x\) |
| Slope | \(m\) | Rate of change (rise/run) |
| y-Intercept | \(b\) | Value of \(y\) when \(x = 0\) |
| Positive association | \(m > 0\) | Both variables increase together |
| Negative association | \(m < 0\) | One goes up, the other goes down |
| Interpolation | — | Predicting within data range |
| Extrapolation | — | Predicting beyond data range |
Question 1 of 5
A line of best fit for "hours practiced vs. free-throw accuracy" has equation \(y = 4x + 30\). What does the slope mean in context?
Question 2 of 5
In the equation \(y = 4x + 30\), what does the y-intercept (30) represent?
Question 3 of 5
A scatter plot shows that as the number of absences increases, test scores decrease. The line of best fit has a slope of \(-3.5\). What does this tell you?
Question 4 of 5
A line of best fit passes through the points \((2, 10)\) and \((6, 26)\). What is the slope?
Question 5 of 5
Your data covers ages 10 to 18. Your line of best fit is \(y = 2.5x + 40\). Which prediction is most reliable?