Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store
seo-qna
SearchIcon
banner

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
VerifiedVerified
461.1k+ views
like imagedislike image
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 (x,y) as: (3,7),(0,4),(3,2),(5,2),(3,3). 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=nxy(x)(y)nx2(x)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:
(3,7),(0,4),(3,2),(5,2),(3,3)
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=nxy(x)(y)nx2(x)2
Now, using the above set of x and y in the above equation we get,
m=5(21+06+109)(3+0+3+5+3)(7+42+23)5(9+0+9+25+9)(3+0+3+5+3)2
m=5×(26)8×85×5282
m=1306426064
m=194196
m=97980.989
Final solution: Hence, the slope of the regression line for the given set of data is 9798 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.