
How do you calculate the slope and intercept of a regression line?
Answer
482.1k+ views
Hint: To calculate the slope and intercept of a regression line, we are going to take a set of data having x and y values. We are taking x and y values because we have to calculate the slope and intercept of a straight line and the straight line is of the form where “m and c” corresponds to slope and intercept of the straight line. We are taking the set of x and y values as: . So, we are going to write the formula for slope and intercept of a regression line which are the expressions containing x, y and n.
Complete step by step answer:
Let us assume that we have drawn the regression line using the following set of x and y values:
The above coordinates are plotted on the graph where in each bracket, first coordinate is the x coordinate and the second coordinate is the y coordinate.
We know that the equation of a straight line contains a slope and intercept and in the below, we are writing the formula for slope and intercept of a regression line.
The formula for slope of the regression line is as follows:
Now, using the above set of x and y in the above equation we get,
The formula for intercept of the regression line is as follows:
Substituting the values of data sets of x and y in the above equation we get,
In the above formula, substitute the value of m (which is the slope of the regression line) which we have calculated above.
In this way, we have shown the calculation of slope and intercept of a regression line for the given set of x and y.
Note:
Regression line we have to draw when we have a dependent and independent variable. The independent variable we have plotted on the x-axis and the dependent variable we have plotted on the y axis and then to get the best fit line which is passing through these points we need this slope and intercept formula. This is the example where we require calculating the slope and intercept of a regression line.
Complete step by step answer:
Let us assume that we have drawn the regression line using the following set of x and y values:
The above coordinates are plotted on the graph where in each bracket, first coordinate is the x coordinate and the second coordinate is the y coordinate.
We know that the equation of a straight line contains a slope and intercept and in the below, we are writing the formula for slope and intercept of a regression line.
The formula for slope of the regression line is as follows:
Now, using the above set of x and y in the above equation we get,
The formula for intercept of the regression line is as follows:
Substituting the values of data sets of x and y in the above equation we get,
In the above formula, substitute the value of m (which is the slope of the regression line) which we have calculated above.
In this way, we have shown the calculation of slope and intercept of a regression line for the given set of x and y.
Note:
Regression line we have to draw when we have a dependent and independent variable. The independent variable we have plotted on the x-axis and the dependent variable we have plotted on the y axis and then to get the best fit line which is passing through these points we need this slope and intercept formula. This is the example where we require calculating the slope and intercept of a regression line.
Latest Vedantu courses for you
Grade 8 | CBSE | SCHOOL | English
Vedantu 8 CBSE Pro Course - (2025-26)
School Full course for CBSE students
₹45,300 per year
Recently Updated Pages
Master Class 12 Business Studies: Engaging Questions & Answers for Success

Master Class 12 English: Engaging Questions & Answers for Success

Master Class 12 Economics: Engaging Questions & Answers for Success

Master Class 12 Social Science: Engaging Questions & Answers for Success

Master Class 12 Maths: Engaging Questions & Answers for Success

Master Class 12 Chemistry: Engaging Questions & Answers for Success

Trending doubts
Which one is a true fish A Jellyfish B Starfish C Dogfish class 10 biology CBSE

The Equation xxx + 2 is Satisfied when x is Equal to Class 10 Maths

Gautam Buddha was born in the year A581 BC B563 BC class 10 social science CBSE

Fill the blanks with proper collective nouns 1 A of class 10 english CBSE

Why is there a time difference of about 5 hours between class 10 social science CBSE

What is the median of the first 10 natural numbers class 10 maths CBSE
