The 365 Data Science team is proud to invite you to our own community forum. A very well built system to support your queries, questions and give the chance to show your knowledge and help others in their path of becoming Data Science specialists.
Ask
Anybody can ask a question
Answer
Anybody can answer
Vote
The best answers are voted up and moderated by our team

plotting the regression line itself

plotting the regression line itself

0
Votes
1
Answer

you didn’t explain explicitly how you derive yhat figure that came after x1 or should i say i dont understand how we got those number   

Start your code here
plt.scatter(x1,y)
yhat = x1*223.1787+101900
fig = plt.plot(x1,yhat, lw=4, c='orange', label ='regression line')
1 Answer

365 Team
0
Votes

Hi Oberewu, 
thanks for reaching out!
In answer to your question here is the formula for yhat:
yhat = x1.b1 + b0
b0 and b1 are the coefficients we obtain from the model fit. b1 is the coefficient for size, whereas b0 is the intercept.
You can find the values in the results table, under coef.
 
Best, 
Eli