1 / 21
Fitting a Linear Function | Lesson 1 of 1

Fitting a Linear Function to a Scatter Plot

Lesson 1 of 1: From Eyeball to Best Fit

In this lesson:

  • Draw a line of fit by eye and write its equation
  • Find the least-squares line with technology
Grade 9 Statistics | HSS.ID.B.6.c
Fitting a Linear Function | Lesson 1 of 1

Learning Objectives for This Lesson

By the end of this lesson, you should be able to:

  1. Confirm a plot suggests a linear association
  2. Estimate a line of fit by eye, balancing points
  3. Find the equation by hand and by regression
  4. Use a fitted line to make predictions
Grade 9 Statistics | HSS.ID.B.6.c
Fitting a Linear Function | Lesson 1 of 1

Which Line? Three Students, Three Lines

Three students draw the "best" line on the same plot.

  • All three lines are slightly different
  • Which one is right? "Draw a good line" is ambiguous

First, a more basic question: does this data even earn a line?

Grade 9 Statistics | HSS.ID.B.6.c
Fitting a Linear Function | Lesson 1 of 1

Which Data Earns a Line?

Compare two plots before fitting:

  • Study hours vs score: rises along a straight path → linear
  • Projectile height vs time: rises then falls → curved

Only the linear one earns a line. This gate is real, not a formality.

Grade 9 Statistics | HSS.ID.B.6.c
Fitting a Linear Function | Lesson 1 of 1

The Gate: Confirm Linear Form First

A roughly linear scatter plot beside a clearly curved scatter plot, the linear one marked fit a line and the curved one marked do not

Fit a line only when the form is roughly straight.

Grade 9 Statistics | HSS.ID.B.6.c
Fitting a Linear Function | Lesson 1 of 1

Your Turn: Should We Fit a Line?

Decide yes or no, and justify from the form:

  1. Temperature vs ice-cream sales: straight upward band
  2. Bouncing ball height vs time: repeated up-down arcs

Decide and justify, then advance.

Answer: 1. Yes — linear form. 2. No — clearly curved; a line is the wrong family.

Grade 9 Statistics | HSS.ID.B.6.c
Fitting a Linear Function | Lesson 1 of 1

A Line of Fit Balances the Cloud

A scatter cloud of points with a line of fit running through the middle, roughly equal points above and below, touching none of them

Roughly as many points above as below; the misses are small.

Grade 9 Statistics | HSS.ID.B.6.c
Fitting a Linear Function | Lesson 1 of 1

The Line May Touch No Data Point

A good line of fit can pass through none of the points.

  • Earlier algebra drew lines through given points
  • A line of fit summarizes the cloud instead

Touching a point is irrelevant to how well the line fits.

Grade 9 Statistics | HSS.ID.B.6.c
Fitting a Linear Function | Lesson 1 of 1

Read the Equation From Two Points

Pick two points on your line (not data points):

Slope from and :

Intercept is 50, so .

Grade 9 Statistics | HSS.ID.B.6.c
Fitting a Linear Function | Lesson 1 of 1

Predict: Connect the First and Last Points?

A student fits a line by connecting the leftmost and rightmost points.

  • Is this a good way to draw a line of fit?
  • Commit to yes or no before advancing

There's a reason this one trips people up.

Answer: No — it ignores all the middle data and tilts badly if an endpoint is unusual.

Grade 9 Statistics | HSS.ID.B.6.c
Fitting a Linear Function | Lesson 1 of 1

Your Turn: Draw a Line, Find Its Equation

For a roughly linear study-hours data set:

  1. Draw a balancing line through the cloud
  2. Pick two points on the line; find slope and intercept
  3. Write the equation

Draw, write the equation, then advance.

Answer: Any balanced line with its two-point equation is acceptable.

Grade 9 Statistics | HSS.ID.B.6.c
Fitting a Linear Function | Lesson 1 of 1

Everyone's Line Differs — We Need One

Your eyeballed lines all differ slightly — all reasonable.

  • "The best line" is still ambiguous
  • We need one precisely defined, reproducible line

That's the least-squares regression line.

Grade 9 Statistics | HSS.ID.B.6.c
Fitting a Linear Function | Lesson 1 of 1

Technology Computes the Least-Squares Line

The calculator or spreadsheet returns the one best-fit line.

  • LinReg on a calculator; SLOPE/INTERCEPT or LINEST in a sheet
  • Enter the data, run it, read

One precise rule, the same equation for everyone.

Grade 9 Statistics | HSS.ID.B.6.c
Fitting a Linear Function | Lesson 1 of 1

Run LinReg on the Study-Hours Data

Step 1: Enter the study-hours and test-score data

Step 2: Run LinReg

Step 3: Read the returned equation

Compare to an eyeballed — close, but precise.

Grade 9 Statistics | HSS.ID.B.6.c
Fitting a Linear Function | Lesson 1 of 1

"Best" Means Smallest Total Squared Misses

A fitted line with vertical residual segments drawn from several data points to the line, illustrating the misses that get squared and summed

  • Each point has a residual — a vertical miss
  • Least-squares makes the total of squared misses smallest
Grade 9 Statistics | HSS.ID.B.6.c
Fitting a Linear Function | Lesson 1 of 1

Regression vs Eyeballed: Close but Precise

The two lines are close, with one difference:

  • The eyeballed line is a good estimate
  • The regression line is precisely defined and reproducible

A small difference between them is expected, not an error.

Grade 9 Statistics | HSS.ID.B.6.c
Fitting a Linear Function | Lesson 1 of 1

Use the Regression Line to Predict

Using , predict the score for 4 study hours.

Substitute :

The model predicts about a 74 — a trend estimate, not exact.

Grade 9 Statistics | HSS.ID.B.6.c
Fitting a Linear Function | Lesson 1 of 1

Quick Check: Is the Hand Line Wrong?

Your hand line is ; the calculator gives .

  • Is your line wrong?
  • Explain in one sentence.

Decide, then advance.

Answer: No — a good eyeballed line is close to, not identical to, the regression line.

Grade 9 Statistics | HSS.ID.B.6.c
Fitting a Linear Function | Lesson 1 of 1

Your Turn: Run a Regression, Then Predict

For an hours-vs-free-throws data set:

  1. State how you'd run the regression
  2. Using , predict the makes at 8 hours

Run it, predict, then advance.

Answer: LinReg → equation; free throws predicted.

Grade 9 Statistics | HSS.ID.B.6.c
Fitting a Linear Function | Lesson 1 of 1

Full Task: Confirm, Eyeball, Regress, Predict

Given a linear-looking scatter plot:

  1. Confirm the form is linear
  2. Draw a line of fit; write its equation
  3. Find the regression line; predict

Do all three, then advance.

Answer: Confirm form; hand line + equation; LinReg line; substitute to predict.

Grade 9 Statistics | HSS.ID.B.6.c
Fitting a Linear Function | Lesson 1 of 1

Key Takeaways and What's Next

Confirm linear form before fitting a line

✓ A line of fit balances the cloud — may touch no point

✓ Least-squares is the reproducible best fit

⚠️ Slope is the rate, not fit quality

⚠️ A good hand line is close to, not identical to, regression

Next: interpret the slope and intercept (C.7).

Grade 9 Statistics | HSS.ID.B.6.c