How to Find the Equation of a Regression Line and Interpret Regression Lines
TL;DR: Take a cloud of scattered data points on a graph, then draw the single straight line that best splits the difference. That’s a regression line. We write it as y-hat equals a plus b times x. The slope b tells you the predicted change in y for every one-unit jump in x, and the intercept a tells you what y looks like when x is zero. Two coefficients, one line, and suddenly you can predict future values from the pattern.
Find the Equation of a Regression Line and Interpret Regression Lines: what to notice and how to work it
What to notice first
Common student mistake
Key formulas and cues
A reliable path
- Identify the questionDecide whether you need center, spread, shape, or association.
- Use the right displayChoose a histogram, box plot, scatter plot, or summary statistic.
- Write the meaningExplain what the statistic says about the data set.
Worked examples
Find IQR
- IQR measures the middle 50%.
- Subtract Q1 from Q3.
- 20 – 8 = 12.
Read association
- As x increases, y tends to increase.
- That is a positive association.
- A best-fit line should have positive slope.
Try one before moving on
Find the Equation of a Regression Line and Interpret Regression Lines: pop-up practice
Key takeaways:
- Regression line equation: \(\hat{y} = a + bx\), where \(\hat{y}\) is the predicted value.
- Slope \(b = r \cdot \dfrac{s_y}{s_x}\); intercept \(a = \bar{y} – b\bar{x}\).
- The line passes through \((\bar{x}, \bar{y})\) – the point of means.
- Slope = predicted change in \(y\) for a one-unit increase in \(x\).
- Don’t extrapolate far beyond your data – the relationship may not hold there.
Finding the regression line in several steps is fully and accurately explained in this article.
Step \(1\): Collect data on the two desired variables and organize them in a scatter plot.
Step \(2\): As mentioned at the beginning of the article, the equation of the line of best fit is found using the least squares method. To find the line, you must first calculate the slope (\(m\)) and \(y\)-intercept (\(b\)). Slope and \(y\)-intercept are calculated using the following formulas:
\(m=\frac{(nΣ(xy)-(Σx)(Σy))}{(nΣ(x^2)-(Σx)^2)}\)
\(b=\frac{(Σy-mΣx)}{n}\)
Step \(3\): Using the found slope and \(y\)-intercept, the equation of the regression line will be \(y=mx+b\).
Step \(4\): The slope and \(y\)-intercept of the regression line are used to interpret the line. The slope shows the amount of change in \(y\) against a unit change in \(x\) and can be interpreted as the strength and direction of the relationship between the variables. A positive slope indicates a positive relationship, while a negative slope indicates a negative relationship. The slope shows the amount of change in \(y\) against a unit change in \(x\) and can be interpreted as the strength and direction of the relationship between the variables. A positive slope indicates a positive relationship, while a negative slope indicates a negative relationship. The \(y\)-intercept represents the value of \(y\) when \(x=0\) and represents the intersection of the line with the \(y\)-axis.
Step \(5\): The correlation coefficient (\(r\)) is used to measure the strength and direction of the linear relationship between two variables. A correlation coefficient of \(+1\) indicates a complete positive linear relationship, a coefficient of \(-1\) indicates a complete negative linear relationship, and a coefficient of \(0\) indicates the absence of a linear relationship. You can use the correlation coefficient for interpretation.
Step \(6\): To interpret the regression line, you can also use the coefficient of determination (\(R^2\)), which indicates the ratio of changes in the dependent variable that is explained by the independent variable. \(R^2\) is always between \(0\) and \(1\), and the closer \(R^2\) is to \(1\), the better the model explains the data.
A regression line is only an approximation of the relationship between variables and may not accurately describe the relationship for values of \(x\) that are outside the range of the data.
Recommended EffortlessMath Books
If you want a deeper, structured walk through every stats topic, Statistics for Beginners builds from descriptive stats all the way to inference with worked examples and practice sets. For AP-track students, AP Statistics for Beginners covers the full AP curriculum with exam-style problems.
Frequently Asked Questions
What is the equation of a regression line?
A regression line is usually written as ŷ = a + bx, where ŷ is the predicted y value, b is the slope and a is the y-intercept. The slope can be found with b = r × (sᵧ ÷ sₓ), and the line always passes through the point (x̄, ȳ), so a = ȳ − b·x̄. Some textbooks write the same line as ŷ = mx + b.
How do you find the equation of a regression line?
Find the means of x and y, their standard deviations and the correlation r. Then compute the slope b = r × (sᵧ ÷ sₓ) and the intercept a = ȳ − b·x̄. For example, if r = 0.8, sᵧ = 10, sₓ = 4, x̄ = 5 and ȳ = 30, then b = 0.8 × 2.5 = 2 and a = 30 − 10 = 20, so ŷ = 20 + 2x.
How do you find the equation of a regression line on a TI-84?
Press STAT, choose Edit, and enter the x values in L1 and the y values in L2. Then press STAT, arrow over to CALC, choose LinReg(a+bx) and press ENTER. The calculator shows a (the intercept) and b (the slope). To also see r and r², turn on the statistics diagnostics setting before running the regression.
How do you find the equation of a regression line in Excel?
Put x values in one column and y values in the next, make a scatter chart, then add a linear trendline and tick Display Equation on chart. You can also use formulas: =SLOPE(y_range, x_range) gives the slope and =INTERCEPT(y_range, x_range) gives the intercept. Both methods give the same least-squares line.
How do you interpret a regression line equation?
The slope is the predicted change in y for each one-unit increase in x, and the intercept is the predicted y when x = 0. If ŷ = 15 + 3x predicts test score from hours studied, each extra hour is linked to about 3 more points. The intercept, 15, only makes sense if zero hours lies within or near the data.
Is the regression equation the same as the line of best fit?
Usually, yes. The least-squares regression line is the most common line of best fit, because it makes the sum of squared vertical distances from the points to the line as small as possible. A line of best fit drawn by eye on a scatter plot is only an estimate, while the regression equation is calculated exactly from the data.
Related EffortlessMath Lessons
If a topic on this page feels rusty, these short lessons go deeper:
Related to This Article
More math articles
- How to Identify Independent and Dependent Events?
- How to Integrate By Parts: Step-by-Step Guide
- Mobility, Opportunity Structures, and Mobility Tables
- 6th Grade PSSA Math Worksheets: FREE & Printable
- Remainder Riddles: How to Decipher Division with One-digit Divisors
- How to Solve Quadratic Equations: 4 Methods Explained
- What is the Relationship between Dilations and Angles in Geometry
- The Best Grade 7 Math Book for Oregon Students
- 10 Most Common 8th Grade MEAP Math Questions
- Correlation Is Not Causation




What people say about "Find and Interpret a Regression Line"?
No one replied yet.