# 统计建模I Statistical Modelling I MATH2010W1-01

Our second test for normality.The observations $y_{1}, y_{2}, \ldots, y_{n}$ are ordered as $y_{(1)} \leq y_{(2)} \leq \cdots \leq y_{(n)}$, and we calculate
\begin{aligned} &D=\frac{\sum_{i=1}^{n}\left[i-\frac{1}{2}(n+1)\right] y_{(i)}}{\sqrt{n^{3} \sum_{i=1}^{n}\left(y_{i}-\bar{y}\right)^{2}}}, \ &Y=\frac{\sqrt{n}\left[D-(2 \sqrt{\pi})^{-1}\right]}{.02998598} . \end{aligned}
A table of percentiles for $Y$, given for $10 \leq n \leq 250$, is provided in Table A.4.
The final test we report is by Lin and Mudholkar (1980). The test statistic is
$$z=\tanh ^{-1}(r)=\frac{1}{2} \ln \left(\frac{1+r}{1-r}\right)$$

If the $y$ ‘s are normal, $z$ is approximately $N(0,3 / n)$. A more accurate upper $100 \alpha$ percentile is given by
$$z_{\alpha}=\sigma_{n}\left[u_{\alpha}+\frac{1}{24}\left(u_{\alpha}^{3}-3 u_{\alpha}\right) \gamma 2 n\right],$$
with
$$\sigma_{n}^{2}=\frac{3}{n}-\frac{7.324}{n^{2}}+\frac{53.005}{n^{3}}, \quad u_{\alpha}=\Phi^{-1}(\alpha), \quad \gamma_{n}=-\frac{11.70}{n}+\frac{55.06}{n^{2}}$$
where $\Phi$ is the distribution function of the $N(0,1)$ distribution; that is, $\Phi(x)$ is the probability of an observation less. The inverse function $\Phi^{-1}$ is essentially a quantile. For example, $u_{.05}=-1.645$ and $u_{.95}=1.645$.

## MATH2010W1-01 COURSE NOTES ：

has a beta distribution, which is related to the $F$ distribution. To obtain a $Q-Q$ plot, the values $u_{1}, u_{2}, \ldots, u_{n}$ are ranked to give $u_{(1)} \leq u_{(2)} \leq \cdots \leq u_{(n)}$, and we plot $\left(u_{(i)}, v_{i}\right)$, where the quantiles $v_{i}$ of the beta are given by the solution to
$$\int_{0}^{v_{i}} \frac{\Gamma(a+b)}{\Gamma(a) \Gamma(b)} x^{a-1}(1-x)^{b-1} d x=\frac{i-\alpha}{n-\alpha-\beta+1}$$
where $a=\frac{1}{2} p, b=\frac{1}{2}(n-p-1)$,
\begin{aligned} \alpha &=\frac{p-2}{2 p} \ \beta &=\frac{n-p-3}{2(n-p-1)} \end{aligned}