For finding line of regression we need to follow the below steps.
Step 1: In first step we write the equation of regression of ‘y’ on ‘x’.
Y = a + bx. Here ‘a’ and ‘b’ are regression values which are dependent on Linear Regression.
Step 2: Now we write the norms equation,
∑ y = a + b ∑x , this is first equation of linear regression.
∑ xy = a∑x + b ∑x2 ,this is second equation of linear regression.
3a + 2b = 1 eq (1),
2a + 20b = 30 eq(2),
Step 3: In this step we solve the both equation (1) and (2).
Here for solving these equation first we are equal both coefficient value of a then we will solve. Now we subtract both equations.
a= 0.666,
b= 1.57,
Now we get final equation value Y = 0.666 + 1.57x.
In the first step we write ‘x’ and ‘y’ value which are given in problem.
We write
x = -1, 2, 5, 6, 1,
And y = 0, 2, 3, 1, 2
Step 2: In this step we find the all summation value.
Summation of x = ∑x = 13,
Summation of y= ∑y = 8,
Summation of xy =∑xy = 27,
Summation of x2 = ∑ x2 = 67,
Step 3: Now we write Linear Regression formula and then we putting value.
a = (n∑ xy - ∑x ∑y)/n∑x2 – (∑x)2 , this is first equation of linear regression in this equation we will put summation value.
= (5*8 – 104)/5*67 – 169,
= 40 -104 / 166 = 64 / 166 = 0.385,
b = 1/n(∑y – a ∑x) this is second equation linear regression in this equation we will put the summation value.
= 1/5(8 - 0.385 *13) =1/5(8+ 5.01) = 13.01/5 = 2.602,
Now we get the value of a = 0.385, b = 2.602.
For solving regression value we need to follow the below steps.
Step 1: In the first step we write ‘x’ and ‘y’ value which are given in problem.
We write
x = 2, 3, 3,
And y = 1, 2, -1.
Step 2: In this step we find the all summation value.
Summation of x =∑x = 8,
Summation of y = ∑y = 2,
Summation of xy =∑xy = 2,
Summation of x2 = ∑ x2 = 6.
Step 3: Now we write the formula of regression and then we put the all summation value in regression equation.
a = (n∑ xy - ∑x ∑y)/n∑x2 – (∑x)2 , this is first equation of Linear Regression in this equation we will put summation value.
= (3*2 – 16)/3*6 – 64,
= -10 / 18 - 64 = -10/-46 = 4.6,
b = 1/n (∑y – a ∑x) this is second equation of linear regression in this equation we will put summation value.
= 1/3 (2 + 4.6*8) = 1/3 (2+ 36.8) = 38.8/3 = 12.9,
Now we get the value of a = 4.6, b = 12.9.
For solving regression value we need to follow the below steps.
Step 1: In the first step we write the ‘x’ and ‘y’ value which are given in problem.
We write
x = -1, 2, 1, 2
And y = 0, -1, 2, 1,
Step 2: In this step we find the all summation value.
Summation of x = ∑x = 4,
Summation of y = ∑y = 2,
Summation of xy = ∑xy = 0,
Summation of x2 = ∑ x2 = 10,
Step 3: Now we write the formula of regression and then we put the all summation value in regression equation.
a = (n∑ xy - ∑x ∑y)/n∑x2 – (∑x)2, this is first equation of Linear Regression in this equation we will put summation value.
(4*0 – 8)/4*10 -16,
= -8 / 40-16 = -8 / 24 = -1/3 = -.33
b = 1/n (∑y – a ∑x), this is second equation of linear regression in this equation we will put summation value.
= ¼ (2 + .33*4) = (2+ 1.32) = 3.32 / 4 = .83,
Now we get the value of a = -.33, b = .83.
For solving regression value we need to follow the below steps.
Step 1: In the first step we write the 'x' and 'y' value which are given in problem.
We write x = -2, 0, 1, 2, y = 0, 1, 3, 3.
Step 2: In this step we find the all summation value
Here summation of x = ∑x = 1,
Summation of y = ∑y = 7,
Summation of xy = ∑xy = 9,
Summation of x2 = ∑x2 = 9,
Step 3: Now we write the formula of regression and then we put the all summation value in regression equation.
a = (n∑ xy - ∑x ∑y)/n∑x2 – (∑x)2 This is first equation of Linear Regression in this equation we will put summation value.
= (4*9 – 7)/4*9 -1 = 29/35 = 0.82,
b = 1/n(∑y – a ∑x) This is second equation of linear regression in this equation we will put summation value.
= ¼ (7 – 0.82*1) = (7-0.82)/4 = 6.18,
Now we get the value of a = 0.82, b =6.18.