Step-by-step explanation:
Regression analysis is used to infer about the relationship between two or more variables.
The line of best fit is a straight line representing the regression equation on a scatter plot. The may pass through either some point or all points or none of the points.
Method 1:
Using regression analysis the line of best fit is: [tex]y=\alpha +\beta x+e[/tex]
Here α = intercept, β = slope and e = error.
The formula to compute the intercept is:
[tex]\alpha =\bar y-\beta \bar x[/tex]
Here [tex]\bar y[/tex] and [tex]\bar x[/tex] are mean of the y and x values respectively.
[tex]\bar y=\frac{\sum y_{i}}{n} \\\bar x=\frac{\sum x_{i}}{n}[/tex]
The formula to compute the slope is:
[tex]\beta =\frac{\sum (x-\bar x)(y - \bar y)}{\sum (x=\bar x)^{2}}[/tex]
And the formula to compute the error is:
[tex]e=y-\alpha -\beta x[/tex]
Method 2:
The regression line can be determined using the descriptive statistics mean, standard deviation and correlation.
The equation of the line of best fit is:
[tex](y-\bar y)=r\frac{\sigma_{x}}{\sigma_{y}} (x-\bar x)[/tex]
Here r = correlation coefficient = [tex]r=\frac{Cov (x,y)}{\sqrt{\sigma^{2}_{x}\sigma^{2}_{y}} }[/tex]
[tex]\sigma_{x}[/tex] and [tex]\sigma_{y}[/tex] are standard deviation of x and y respectively.
[tex]\sigma_{x}=\frac{1}{n}\sum (x-\bar x)^{2} \\\sigma_{y}=\frac{1}{n}\sum (y-\bar y)^{2}[/tex]