Problem

Given the data set {(1,3), (2,5), (3,7), (4,9)}, find the regression line.

Solution

Step 1 :Step 1: Compute the means of x-values and y-values. \( \bar{x} = \frac{1+2+3+4}{4} = 2.5 \) and \( \bar{y} = \frac{3+5+7+9}{4} = 6 \)

Step 2 :Step 2: Compute the slope (b) of the regression line using the formula \( b = \frac{n(\sum xy) - (\sum x)(\sum y)}{n(\sum x^2) - (\sum x)^2} \). Substituting the given values, we get \( b = \frac{4(1*3 + 2*5 + 3*7 + 4*9) - (1+2+3+4)(3+5+7+9)}{4(1^2 + 2^2 + 3^2 + 4^2) - (1+2+3+4)^2} = 2 \)

Step 3 :Step 3: Compute the y-intercept (a) of the regression line using the formula \( a = \bar{y} - b\bar{x} \). Substituting the computed values, we get \( a = 6 - 2*2.5 = 1 \)

Step 4 :Step 4: Substitute the computed values of a and b into the regression line equation \( y = ax + b \), we get the regression line as \( y = 1 + 2x \)

From Solvely APP
Source: https://solvelyapp.com/problems/GhVsvTgINk/

Get free Solvely APP to solve your own problems!

solvely Solvely
Download