How can I find the coefficient of correlation between ordered residuals and their expected values under normality? As the question says I have to find the coefficient of correlation between ordered residuals and expected values under normality in Minitab. How can I do so? I have just started using Minitab and am a novice at it.
 A: First you need to calculate the ordered residuals.  That is, you need to sort the residuals from smallest to largest, i.e., $e_1<e_2<...<e_n$ where $e_i$ is the $i^{th}$ residual. Now, to calculate the expected values, under normality, we use the following steps:
1) Calculate $$z_i=\Phi^{-1}\left(\frac{i-0.375}{n+0.25}\right)$$ for $i=1,...,n$ and $\Phi^{-1}()$ is the inverse CDF of the standard normal distribution.
2) Calculate the Mean Squared Error (MSE)
$$MSE = \sum_{i=1}^n\frac{(y_i-\hat y)^2}{n-p}=\sum_{i=1}^n\frac{(\text{residuals})^2}{n-p}$$
where $p$ is the number of parameters you are estimating in your model (my guess is $p=2$)
3) Calculate the expected value as
$$E_i=z_i\times\sqrt{MSE}$$
Now, recall that one formula for the correlation in a linear model is:
$$r=\frac{S_{xy}}{\sqrt{S_{xx}S_{yy}}}$$
and so all we need to do is calculate $S_{xy}$, $S_{xx}$, and $S_{yy}$ and then we will have our correlation.
Now, using the ordered residuals $e_1,e_2,...,e_n$ and the expected values $E_1,E_2,...,E_n$ we have the following:
$$S_{xy}=\sum_{i=1}^n(E_i-\bar E)(e_i-\bar e)$$
$$S_{xx}=\sum_{i=1}^n(E_i-\bar E)^2$$
$$S_{yy}=\sum_{i=1}^n(e_i-\bar e)^2$$
where $\bar E = \frac{1}{n}\sum_{i=1}^n E_i$ and $\bar e = \frac{1}{n}\sum_{i=1}^n e_i$
Now I typed up/explained the answer in modest detail but the solution to this problem was a very easy google search.  Here are some websites that solve this problem as well: http://courses.washington.edu/qsci483/Lectures/15.pdf and http://www.stat.columbia.edu/~fwood/Teaching/w4315/Fall2010/homework_4/homework_4_solution
