What is the linear regression equation for the data above?
What is the linear regression equation for the data above?
Solution
To find the linear regression equation for the given data, we first need to calculate the slope (m) and intercept (b) of the line of best fit. The linear regression equation is given by:
y=mx+b
where y is the price of the house, and x is the size of the house.
Step 1: Calculate the Means
Mean of size (xˉ):
xˉ=61200+1339+1382+2351+2369+3600=2040
Mean of price (yˉ):
yˉ=6320+430+389+635+689+750=535.5
Step 2: Calculate the Slope (m)
The formula for the slope is:
m=∑(xi−xˉ)2∑(xi−xˉ)(yi−yˉ)