# On the Subrange and Its Application to the R-Chart
## 2 The Distribution of the Subrange  
Let \(X_{1},X_{2},\cdots X_{n}\) be a random sample with continuous cdf \(F(x)\) and pdf \(f(x)\). Let \(X_{(1)},X_{(2)},\cdots X_{(n)}\) be the order statistics of a random sample. Then the joint pdf of \(X_{(i)}\) and \(X_{(j)}\) for \(1\leq i<j\leq n\) is given by  
\[f_{(i,j)}(u,v)\ =\ \frac{n!}{(i-1)!(j-i-1)!(n-j)!}f(u)f(v)[F(u)]^{i-1}[F(v)- F(u)]^{j-i-1}[1-F(v)]^{n-j}, \tag{1}\]  
for \(-\infty<u<v<\infty\). For more details on the above result, refer to [PERSON] [28], and [PERSON] et al. [30].  
We consider the symmetrically trimmed subrange. That is, we exclude the \(k\) smallest and \(k\) largest values. Thus, the symmetrically trimmed subrange is defined as \(R_{[k]}=X_{(n-k)}-X_{(k+1)}\) where \(k\ =\ 0,1,2,\cdots,\lfloor n/2\rfloor-1\) and \(n\geq 2\). Here \(\lfloor x\rfloor\) is the largest integer less than or equal to \(x\). Note that \(R_{[k]}\) becomes the regular range with \(k\ =\ 0\).  
We assume that a random sample is from a normal distribution with mean \(\mu\) and standard deviation \(\sigma\). It is well known that the range is not unbiased to estimate \(\sigma\). Bydividing \(R\) by the unbiasing factor \(d_{2}\), we can easily make this \(R\) unbiased. The values of \(d_{2}\) are provided in the quality control literature--for more details refer to [PERSON] [32] and [PERSON] [33].  
In this paper, we will provide the unbiasing factor which makes \(R_{[k]}\) unbiased for \(\sigma\). We denote this factor by \(d_{2}(n,k)\). It should be noted that the factor \(d_{2}\) depends on the sample size \(n\) and the number of trims \(k\) in the sample.  
For notational convenience, we denote the joint pdf of \(X_{(k+1)}\) and \(X_{(n-k)}\) by \(f(u,v)\). Then we have  
\[f_{k}(u,v)\ =\ \frac{n!}{\left(k!\right)^{2}(n-2k-2)!}f(u)f(v)\big{[}F(u) \big{]}^{k}\big{[}1-F(v)\big{]}^{k}\big{[}F(v)-F(u)\big{]}^{n-2k-2}.\]  
Let \(Z_{1},Z_{2},\cdots Z_{n}\) be a random sample from a standard normal distribution with pdf \(\phi(z)\) and cdf \(\Phi(z)\). For notational convenience, we denote \(W_{1}\ =\ Z_{(k+1)}\) and \(W_{2}\ =\ Z_{(n-k)}\). Using (1), we have the joint pdf of \(W_{1}\) and \(W_{2}\).  
\[f_{k}(w_{1},w_{2})\ =\ \frac{n!}{\left(k!\right)^{2}(n-2k-2)!}\phi(w_{1}) \phi(w_{2})\big{[}\Phi(w_{1})\big{]}^{k}\big{[}1-\Phi(w_{2})\big{]}^{k}\big{[} \Phi(w_{2})-\Phi(w_{1})\big{]}^{n-2k-2}.\]  
The goal is to derive the distribution of the subrange, \(W_{2}-W_{1}\ =\ Z_{(n-k)}-Z_{(k+1)}\) where the \(Z_{i}\) are from the standard normal distribution, \(N(0,1)\). Next, we consider the new random variables given by \(Y_{1}\ =\ W_{1}\) and \(Y_{2}\ =\ W_{2}-W_{1}\). Notice that the random variable \(Y_{2}\) is the subrange. The inverse transformations are easily obtained by \(w_{1}\ =\ y_{1}\) and \(w_{1}\ =\ y_{2}+y_{1}\). Then, using the bivariate transformations, the joint pdf of \(Y_{1}\) and \(Y_{2}\), denoted by \(g_{k}(y_{1},y_{2})\) is given by  
\[g_{k}(y_{1},y_{2})\ =\ \frac{n!}{\left(k!\right)^{2}(n-2k-2)!}\phi(y_{1}) \phi(y_{1}+y_{2})\Phi(y_{1})^{k}\big{[}1-\Phi(y_{1}+y_{2})\big{]}^{k}\big{[} \Phi(y_{1}+y_{2})-\Phi(y_{1})\big{]}^{n-2k-2}\big{|}J|,\]  
where \(-\infty<y_{1}<\infty,y_{2}>0\) and \(J\) is the determinant of the Jacobian matrix given by  
\[J\ =\ \det\left[\begin{array}{cc}\frac{\partial w_{1}}{\partial y_{1}}& \frac{\partial w_{1}}{\partial y_{2}}\\ \frac{\partial w_{2}}{\partial y_{1}}&\frac{\partial w_{2}}{\partial y_{2}} \end{array}\right]\ =\ \det\left[\begin{array}{cc}1&0\\ 1&1\end{array}\right]\ =\ 1\]  
For more details, see [PERSON] and Berger [28]. Then the pdf \(Y_{2}\ =\ R_{[k]}\ =\ Z_{(n-k)}-Z_{(k+1)}\) is just the marginal pdf of \(Y_{2}\), which is given by  
\[g_{[k]}(y_{2})\ =\ \int_{-\infty}^{\infty}\frac{n!}{\left(k!\right)^{2}(n-2k-2)!}\phi(y_{1})\phi(y_{1}+y_{2})\Phi(y_{1})^{k}\big{[}1-\Phi(y_{1}+y_{2})\big{]} ^{k}\big{[}\Phi(y_{1}+y_{2})-\Phi(y_{1})\big{]}^{n-2k-2}dy_{1} \tag{2}\]  
where \(k\ =\ 0,1,2,\cdots,\lfloor n/2\rfloor-1\) and \(n\geq 2\) again.