Can someone explain to me the mechanics of the Shapiro–Wilk test for normality?
I have that: $$W = \frac{ \sum (x_{(j)}-\bar{x})(m_{(j)}-\bar{m})}{\sum (x_{j}-\bar{x})^{2} \sum m_{j}^2}\,\,,$$ where $m_{j}$ is the expected value of the $j$th order statistic from $N(0,1)$.
So, what is $x_{j}$ here? Is the $m_{j}$ from a theoretical distribution, or from an observed sample? What is the test statistic comparing?