
How do you find the slope of the regression line for the following set of data?
X values -3 0 3 5 3
Y values 7 4 -2 2 -3
Answer
529.8k+ views
Hint: To calculate the slope and intercept of a regression line, we are going to take the set of data having $x$ and $y$ values. We are taking $x$ and $y$ values because we have to calculate the slope of a straight line and the straight line is of the form $y = mx + c$, where "$m$ and $c$" corresponds to slope and intercept of the straight line. We are taking the set of $x$ and $y$ values $\left( {x,y} \right)$ as: $\left( { - 3,7} \right),\left( {0,4} \right),\left( {3, - 2} \right),\left( {5,2} \right),\left( {3, - 3} \right)$. Then, find the slope of the regression line for the given set of data by putting the values of $x,y,n$ in the formula for slope of the regression line.
Formula used:
The formula for slope of the regression line is as follows:
$m = \dfrac{{n\sum {xy} - \left( {\sum x } \right)\left( {\sum y } \right)}}{{n\sum {{x^2}} - {{\left( {\sum x } \right)}^2}}}$
Complete step by step answer:
Let us assume that we have drawn the regression line using the following set of $x$ and $y$ values:
$\left( { - 3,7} \right),\left( {0,4} \right),\left( {3, - 2} \right),\left( {5,2} \right),\left( {3, - 3} \right)$
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:
$m = \dfrac{{n\sum {xy} - \left( {\sum x } \right)\left( {\sum y } \right)}}{{n\sum {{x^2}} - {{\left( {\sum x } \right)}^2}}}$
Now, using the above set of $x$ and $y$ in the above equation we get,
$m = \dfrac{{5\left( { - 21 + 0 - 6 + 10 - 9} \right) - \left( { - 3 + 0 + 3 + 5 + 3} \right)\left( {7 + 4 - 2 + 2 - 3} \right)}}{{5\left( {9 + 0 + 9 + 25 + 9} \right) - {{\left( { - 3 + 0 + 3 + 5 + 3} \right)}^2}}}$
$ \Rightarrow m = \dfrac{{5 \times \left( { - 26} \right) - 8 \times 8}}{{5 \times 52 - {8^2}}}$
$ \Rightarrow m = \dfrac{{ - 130 - 64}}{{260 - 64}}$
$ \Rightarrow m = \dfrac{{ - 194}}{{ - 196}}$
$\therefore m = \dfrac{{97}}{{98}} \approx 0.989$
Final solution: Hence, the slope of the regression line for the given set of data is $\dfrac{{97}}{{98}}$ or $0.989$.
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 the slope and intercept formula. This is the example where we require calculating the slope and intercept of a regression line.
Formula used:
The formula for slope of the regression line is as follows:
$m = \dfrac{{n\sum {xy} - \left( {\sum x } \right)\left( {\sum y } \right)}}{{n\sum {{x^2}} - {{\left( {\sum x } \right)}^2}}}$
Complete step by step answer:
Let us assume that we have drawn the regression line using the following set of $x$ and $y$ values:
$\left( { - 3,7} \right),\left( {0,4} \right),\left( {3, - 2} \right),\left( {5,2} \right),\left( {3, - 3} \right)$
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:
$m = \dfrac{{n\sum {xy} - \left( {\sum x } \right)\left( {\sum y } \right)}}{{n\sum {{x^2}} - {{\left( {\sum x } \right)}^2}}}$
Now, using the above set of $x$ and $y$ in the above equation we get,
$m = \dfrac{{5\left( { - 21 + 0 - 6 + 10 - 9} \right) - \left( { - 3 + 0 + 3 + 5 + 3} \right)\left( {7 + 4 - 2 + 2 - 3} \right)}}{{5\left( {9 + 0 + 9 + 25 + 9} \right) - {{\left( { - 3 + 0 + 3 + 5 + 3} \right)}^2}}}$
$ \Rightarrow m = \dfrac{{5 \times \left( { - 26} \right) - 8 \times 8}}{{5 \times 52 - {8^2}}}$
$ \Rightarrow m = \dfrac{{ - 130 - 64}}{{260 - 64}}$
$ \Rightarrow m = \dfrac{{ - 194}}{{ - 196}}$
$\therefore m = \dfrac{{97}}{{98}} \approx 0.989$
Final solution: Hence, the slope of the regression line for the given set of data is $\dfrac{{97}}{{98}}$ or $0.989$.
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 the slope and intercept formula. This is the example where we require calculating the slope and intercept of a regression line.
Recently Updated Pages
Master Class 11 Business Studies: Engaging Questions & Answers for Success

Master Class 11 Computer Science: Engaging Questions & Answers for Success

Master Class 11 Maths: Engaging Questions & Answers for Success

Master Class 11 Chemistry: Engaging Questions & Answers for Success

Master Class 11 Economics: Engaging Questions & Answers for Success

Master Class 11 Accountancy: Engaging Questions & Answers for Success

Trending doubts
What is meant by exothermic and endothermic reactions class 11 chemistry CBSE

10 examples of friction in our daily life

One Metric ton is equal to kg A 10000 B 1000 C 100 class 11 physics CBSE

1 Quintal is equal to a 110 kg b 10 kg c 100kg d 1000 class 11 physics CBSE

Difference Between Prokaryotic Cells and Eukaryotic Cells

What are Quantum numbers Explain the quantum number class 11 chemistry CBSE

