What would you like to understand?

Popular destinationsCalculatorsCoursesPracticeFormulas

Unlock Premium Help

Explore every tutor and study workspace for seven days, with no daily AI cap during the trial.

Choose a billing period
Ask a parent to pay

Nothing is charged during the first seven days. Unless you cancel, the plan you selected begins when the trial ends and renews on its stated schedule. Manage cancellation from your plan page. Stripe handles the payment details.

Least-squares regression line formula: what it means and how to use it

Predict a response using the line minimizing squared residuals. This regression relationship belongs to statistics. Read the symbols against the problem, confirm the required conditions, and estimate the scale before calculating.

\[\hat y=b_0+b_1x,\quad b_1=r\frac{s_y}{s_x},\quad b_0=\bar y-b_1\bar x\]

Define the population, event, or assumptions first

The fitted relationship is only supported over the range of x actually observed. A line built from children aged 2 to 10 will happily predict a height for a 40-year-old, and the prediction will be absurd. Nothing in the arithmetic warns you that you have left the data behind.

What each quantity represents in Least-squares regression line

Name the experiment or data-generating process, distinguish sample information from population parameters, and state the event or estimate in words. Rebuild missing background in the statistics subject guide, then use statistics practice to retrieve the relationship without being told its name.

Interpret a complete Least-squares regression line calculation

The numerical line is only the middle of the answer; connect it back to the event, data, or uncertainty:

\[If $r=.8,s_y=10,s_x=4$, then $b_1=2$.\]

Compute without losing the statistical question

  1. Name the unknown, and the unit the answer has to come out in.
  2. Match the symbols to your values. $b_1$ is slope, $b_0$ intercept, and $\hat y$ predicted response.
  3. Check the conditions before substituting. $s_x>0$; interpret within the data range unless extrapolation is justified.
  4. Substitute, keep exact values to the last line, then test the sign, size, and unit against a rough estimate - The check that catches most statistics slips.

Check the range, direction, and interpretation

After using Least-squares regression line, repeat the calculation with units attached and test the result against a boundary case or a quick numerical estimate.

An inference this formula does not justify

What goes wrong: Flipping the two spreads in the slope, using s of x over s of y.

Why it fails: With a correlation of 0.8, a y spread of 10 and an x spread of 4, the slope is 2. The flipped version gives 0.32, a line that is far too flat and predicts badly at every x.

Repair: Remember the slope carries the units of y per unit of x, so the y spread has to sit on top for the units to come out right.

Questions about interpreting Least-squares regression line

Does the line pass through any of the actual data points?

Not necessarily, and often through none of them. It always passes through the point made by the two means, which is a useful check when you plot your fitted line by hand.

Is the line for predicting y from x the same as the one for predicting x from y?

No, they are two different lines unless the correlation is exactly 1 or -1. Each one minimises misses in its own direction, so swapping the roles changes the answer.

How do I know a straight line was the right choice?

Plot the residuals against x. A shapeless band supports the line, while a clear curve or a fanning pattern says the model is missing something the data are trying to tell you.

What does the intercept mean in a real problem?

It is the predicted response when x is zero, which is only meaningful if zero is a sensible and observed value of x. Otherwise treat it as a number that positions the line, not as a finding.

Make it yours

Change one input, predict whether the output should rise, fall, or stay fixed, and only then recalculate.