From the given data of x & y
CASE 1 :
Let us consider that y is the dependent variable and x is an independent variable then the formula for the regression line is given by,
y = a + bx
where,
a = y intercept
b = slope of the line
The formula for a and b is given by,
b=n∑(x)2−(∑x)2n∑(xy)−∑x∑y and a=n∑y−bn∑x
where n = sample size = 6
from the above table we get the values of a and b as under
b=n∑(x2)−(∑x)2n∑(xy)−∑x∑y=6∗91−2126∗174−21∗42=1.5428
a=n∑y−bn∑x=642−1.542857∗621=1.6
Hence the equation of the regression line becomes y = 1.6 + 1.54x
So the value of y, when x = 2.5 can be found using above equation
y = 1.6 + 1.54*2.5 = 5.457
(X1,Y1) = (2.5 , 5.457)
CASE 2 :
Let us consider that x is the dependent variable and y is an independent variable then the formula for the regression line is given by,
x = a + by
where,
a = x intercept
b = slope of the line
The formula for a and b is given by,
b=n∑(y)2−(∑y)2n∑(xy)−∑x∑y and a=n∑x−bn∑y
where n = sample size = 6
from the above table we get the values of a and b as under
b=n∑(y)2−(∑y)2n∑(xy)−∑x∑y=6∗336−4226∗174−21∗42=149=0.64285
a=n∑x−bn∑y=621−0.64285∗642=−1
Hence the equation of the regression line becomes x = -1 + 0.64y
So the value of x, when y = 7 can be found using above equation
x = -1 + 0.64*7 = 3.48
(X2 , Y2) = (3.48 , 7)
Comments