Linear regression
Linear regression draws the straight line that best follows the points of two variables, to estimate one from the other: y = a + b·x.
Select any words here to ask your Maestro about them.
With 24 days from 64 to 93 °F, the line explains 96% of the variation in sales (R² = 0.96). How well does it predict a 40 °F day?
What it's for: estimating one number from another: how much you'll sell given the temperature, what a house costs given its square footage, how long a delivery takes given the distance. The slope tells you how much one changes for each unit of the other.
Before you trust it: plot the points on a scatter plot. If they don't follow a straight line, the line lies even though Excel hands you an equation. Check for outliers, which pull it.
A line that follows the points well measures a correlation, not a cause. With several variables at once it's called multiple linear regression, one of the simplest machine learning models.
Practice it in When to use a scatter plot.
How it's used
How to get it in Excel
Named ranges: temp (B2:B25) and cups (C2:C25)
- marked: =SLOPE(cups,temp)
- 3.54Extra cups for each degree.
- =INTERCEPT(cups,temp)
- −162.7The intercept: with the slope, it gives you the line's equation.
- =FORECAST.LINEAR(85,cups,temp)
- 138What it predicts for an 85 °F day.
- =RSQ(cups,temp)
- 0.96How much of the variation the line explains, from 0 to 1.
When to look closer
One day that moves the line
You added a street-fair day with 300 cups to your 24 days. Can a single day change the line much?
Ask your Maestro about Linear regression
It answers from the free course page closest to this word, the way it answers while you study.
You: What does "Linear regression" mean, in plain words?
Your Maestro: I'll explain it with a case of yours: it sticks better than a definition. Which number at work would you like to estimate from another?
Asking about: Answers from the page "Did it go up 2% or 2 points? Percentage points vs. percent"
Only this browser keeps what you ask here. How it works
Learn more
Related terms
- Scatter plot
A scatter plot draws one dot per case, with one variable on each axis, to show whether two numbers move together: when one goes up, does the other go up, go down, or do nothing?
- Correlation
Correlation measures how closely two numbers move together, from −1 to 1. Near 1: when one rises, so does the other. Near 0: no straight-line link.
- Outlier
An outlier is a value that sits far from the rest, like a $9,800 order among $300 ones. It can be a data-entry error or a real, important case: before you drop it, find out which.
- Machine learning
Machine learning has a program learn rules from examples that come with answers, instead of someone writing them, so it can predict new cases.