how to find yhat ie the regression equation (the constant and the x variable used??)
plt.scatter(x1,y)
yhat = x1*223.1787+101900
fig = plt.plot(x1,yhat, lw=4, c='orange', label ='regression line')
plt.xlabel('Size', fontsize = 20)
plt.ylabel('Price', fontsize = 20)
plt.show() how do you determine the coefficients of the underlined equation?
yhat = x1*223.1787+101900
fig = plt.plot(x1,yhat, lw=4, c='orange', label ='regression line')
plt.xlabel('Size', fontsize = 20)
plt.ylabel('Price', fontsize = 20)
plt.show() how do you determine the coefficients of the underlined equation?
1 answers ( 0 marked as helpful)
Hi Kartikeya,
As explained a bit later, the regression equation is determined by the coefficients and the intercept from the regression table.
Please hold on for a couple of lectures and you will see that!
Best,
Iliya