Mathovore, everything you need to succeed in math: Common Core lessons, worksheets, tests and quizzes
Skip to content

Linear Regression

Linear Regression – definition and example, Algebra 1 math glossary – Mathovore

Key takeaway: Linear regression is the process of finding the straight line that best fits a set of paired data points, then using its equation to describe the trend and predict new values.

Grade 9 – Algebra 1S-ID.B.6aStatistics and Data

Definition of Linear Regression

Definition

Linear regression draws one straight line through a cloud of points so that the line follows the general direction of the data. The outcome is an equation \(\hat{y} = mx + b\) that converts an input \(x\) into a predicted output.

A graphing calculator or spreadsheet picks the line that keeps the total of the squared gaps to the points as small as possible. That choice is called the least-squares line. The method fits best when the scatter plot looks like a narrow, tilted band, and it is safest for inputs that lie between the smallest and largest values you collected.

Formula and notation

The output of linear regression is a line written in slope-intercept form:

\[ \hat{y} = mx + b \]

Here \(m\) is the slope (change in predicted \(y\) for each 1 unit of \(x\)), \(b\) is the \(y\)-intercept (predicted \(y\) when \(x = 0\)), and \(\hat{y}\) is a predicted value, not an observed one.

outdoor temperature (°F)cups sold30°F gives 54 cupsy-hat = -1.4x + 96
Colder days sell more hot chocolate: the line y-hat = -1.4x + 96 predicts 54 cups at 30°F.

Key facts

  • Read the slope in context as a rate: so many units of y per unit of x.
  • The intercept can be meaningless when x = 0 falls outside the collected data.
  • Predicting far beyond the collected data is risky and can give impossible values.
  • The correlation coefficient r shows how tightly the points hug the fitted line.

Linear Regression example

Problem

A food truck tracks the outdoor temperature \(x\) in °F and the cups of hot chocolate sold \(y\) during lunch. A calculator returns \(\hat{y} = -1.4x + 96\). Interpret the slope and predict sales on a 30°F day.

  1. The slope is \(m = -1.4\): each 1°F rise in temperature goes with about 1.4 fewer cups sold.

  2. Substitute \(x = 30\): \(\hat{y} = -1.4(30) + 96\).

  3. Compute: \(-42 + 96 = 54\).

The model predicts about 54 cups on a 30°F day.

Common mistake

Watch out

Using the same line, Dana predicts sales for a 95°F July afternoon: \(-1.4(95) + 96 = -37\) cups.

Why it is wrong

The collected temperatures only ran from about 10°F to 65°F, so 95°F is far outside them. Stretching the line there gives a negative number of cups, which cannot happen. A linear regression model should be trusted only near the range of the observed data.

Related terms and lessons

Browse the glossary: A–Z list · Algebra 1 vocabulary · Statistics and Data

Rate this page