Line of Best Fit
Learn to draw a line of best fit by eye on a scatter plot, find its equation from two points and explain what its slope and intercept mean.
Definition
- has about half of the points above it and half below it
- follows the direction of the points (up, down, how steep)
- has the points spread along its whole length, not all above at one end and all below at the other
Try it now
Worked Examples
Check line B
Check line C
Check line A
Decide
Answer: Line A, , is the best line of best fit. Line B is too high and line C is too flat.
Common Mistakes
Drawing the line from the first data point to the last one
Why it's wrong: The first and last points can be unusual. A line through them often has most points on one side.
Correct: Ignore single points and look at the whole cloud: about half the points above, half below. The line may pass through no point at all.
Balancing the number of points but not following the trend
Why it's wrong: A line that is too flat can have 4 points above and 4 below, but all the low ones sit at the left end and the high ones at the right end.
Correct: Check both ends: near each end of the line there should be points above and below it.
Finding the slope from two data points instead of two points on the line
Why it's wrong: Data points are usually not on the line, so their slope is not the slope of your line.
Correct: Read two points that lie on your drawn line, far apart and on grid crossings, then use .
Reading the slope as a value of y instead of a change
Why it's wrong: In for weeks and push-ups, is not "2 push-ups". It is the change per week.
Correct: Say the slope with both units: about 2 more push-ups per week of training.
Interactive Visual
Scatter Plot
Weeks of training and push-ups
ŷ = 1.93x + 3.32
r = 0.982 · strong positive correlation
Tap a point to see its coordinates.
Function graph
Tap the grid to place a point. Tap a point again to remove it.Place at least 2 points to see the line through them.
Interactive Sandbox
Interactive Grapher
Tap or hover over the graph to read off values.
Try these examples:
y = 2x + 3
m=2, b=3
Expression Calculator
Try these:
History
No calculations yet
Practice Problems
18 problemsWhy It Matters
- Sport: a coach sees how fast an athlete improves per week of training
- Shops: a café sees how many fewer hot drinks it sells on every warmer day
- Science: a student finds how fast a plant grows per day from scattered measurements
- Money: a buyer sees how much a used bike loses in value per year
Real World Applications
Training for a Race
Coaches draw a trend line through an athlete's times to see how much faster they get each week.
Example:
A runner's 5 km times drop from about 30 minutes to about 22 minutes over a few weeks. The trend line shows the steady improvement even on bad days.
The line of best fit for a runner's 5 km time (minutes) after weeks passes through and .
What is the slope of the line, in minutes per week?
Step 1: Write the mathematical expression
Slope = change in y divided by change in x:
Lemonade Stand
Small sellers plot temperature against sales to plan how much to prepare.
Example:
On hot days a stand sells many more cups. A trend line through a summer of data shows about how many extra cups each degree brings.
A lemonade stand's line of best fit for temperature (°C) and cups sold passes through and .
What is the y-intercept of this line?
Step 1: Write the mathematical expression
Find the slope, then use :
Plant Growth Experiment
In science class, students measure a plant every few days and use a trend line to describe its growth rate.
Example:
Measurements are never perfect, so the heights scatter a little. The line of best fit gives one growth rate in centimeters per day.
A plant is measured on days with heights cm. The line of best fit has slope and passes through the mean point.
What is the intercept of the line?
Step 1: Write the mathematical expression
Use the mean point in :
Key Takeaways
- 1A line of best fit is a straight line that shows the overall trend of the points on a scatter plot
- 2Draw it by eye so that about half the points are above it and half below, along its whole length
- 3The line follows the direction of the data and may pass through no data point at all
- 4Find its equation from two points on the line: , then
- 5The slope is the change in per unit of ; the intercept is the predicted at , which may have no real meaning
- 6The least-squares line always passes through the mean point , so a good line by eye passes close to it
Frequently Asked Questions
Glossary
- Line of best fit
- A straight line through a scatter plot that shows the overall trend of the data (also called a trend line)
- Slope
- The change in for each increase of 1 in ; along the line,
- Intercept
- The value of where the line crosses the y-axis, at
- Mean point
- The point made of the mean of all x-values and the mean of all y-values (also called the point of means)
- Regression line
- The exact line of best fit found by the least-squares method; it always passes through the mean point
Formula Card
Slope from two points
Use two points on the drawn line, not data points
Intercept
Put one point of the line and the slope into $y = mx + b$
Line of best fit
The equation of the trend line
Mean point
The least-squares line passes through $(\bar{x}, \bar{y})$