= Solution
For the residual-versus-fitted plot, compute <fitted values> $\widehat y_i=\widehat\beta_0+\widehat\beta_1x_{i1}+\widehat\beta_2x_{i2}$ and <regression residuals> $e_i=y_i-\widehat y_i$; the plotted point is $(\widehat y_i,e_i)$.
For the normal <Q-Q plot>, let $H=X(X^TX)^{-1}X^T$ be the <hat matrix> for the full three-column <design matrix> and let $s^2=\operatorname{RSS}/(n-3)$. Form the <standardized regression residuals>
$$
r_i=\frac{e_i}{s\sqrt{1-h_{ii}}}
$$
and order them as $r_{(1)}\leq\cdots\leq r_{(n)}$. R plots $r_{(j)}$ against $\Phi^{-1}(p_j)$, where $p_j$ are its plotting positions. For $n>10$, $p_j=(j-1/2)/n$; $\Phi$ is the <standard normal distribution> function. This standardization is specified in https://stat.ethz.ch/R-manual/R-devel/library/stats/html/plot.lm.html[R's diagnostic-plot documentation].
The original PDF shows a residual cloud around zero without compelling systematic curvature or a clear funnel, and a Q-Q pattern approximately following the reference line. Observations 81 and 83 are conspicuous positive tail points, with a smaller lower-tail departure. \b[The plots show no decisive violation of linearity, constant variance or normality, but the extreme residuals merit inspection.] They do not test independence across observations and cannot establish that all model assumptions hold.
Back to article page