How to calculate fitted values and residuals from a set of data

$\begingroup$

Given a set of data with 11 observations of two variables (response and predictor), I've been asked to "calculate the fitted values $\hat y_i = \hatα + \hatβx'_i $ and residuals $e_i = y_i − \hat y_i$ by hand".

What is the question asking me to do here? I have thus far estimated the regression line for the data in the form $\hat y_i = \hatα + \hatβx'_i $ by calculating the coefficients α & β, but I presume this doesn't answer the original question alone. Where do I go from here? Thanks.

$\endgroup$

1 Answer

$\begingroup$

If you have calculated $\hat{\alpha}$ and $\hat{\beta}$ you can compute the 11 values of $\hat{y_i}$ by plugging in the 11 values of $x_i$.

Compare the value predicted by the regression, $\hat{y_i}$, and the actual value it should be $y_i$.

Their difference is the residual.

$\endgroup$

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like