Solved – Order Statistics, Expected Value of range, $E(X_{(n)}-X_{(1)})$

distributionsexpected valueorder-statisticsprobabilityself-study

$X_1, X_2,…,X_n$ is a random sample from $U(0,\theta)$. Find $E(X_{(n)}-X_{(1)})$.

I attempted this question by first finding the CDF of $X_{(n)}-X_{(1)}$ using the formula:
$$F_{U}(u)= n\int_0^\theta f(x)[F(u+x)-F(x)]^{n-1}dx$$
Where $U=X_{(n)}-X_{(1)}$, $f(x)$ is the PDF of $U(0,\theta)$ and $F(x)$ is the CDF of $U(0,\theta)$.

Using this formula I obtained:
$$F_{U}(u)=n\frac{u^{n-1}}{\theta^{n-1}}$$

Now, using the following formula for non-negative continuous random variables:
$$E(U) = \int_0^\theta (1-F_{U}(u))du$$

I obtained:
$$E(U) = \int_0^\theta \Big(1-n \Big(\frac{u}{\theta}\Big)^{n-1}\Big)du=\theta – \frac{n}{\theta^{n-1}}\Big[\frac{u^n}{n}\Big]_{0}^{\theta}=\theta-\theta=0$$

However, if I break the expectation and calculate individually,
$$E(U) = E(X_{(n)})-E(X_{(1)})$$
I get the answer as:
$$E(U) = \frac{n-1}{n+1}\theta$$ which I believe is the right answer. Can someone please explain why is the former method giving an incorrect answer?

EDIT:
Proof of CDF of $X_{(n)}-X_{(1)}$. (General case when $X_{i}$'s are defined over the range $(-\infty,\infty))$

Proof of CDF of $X_{(n)}-X_{(1)}$. (General case when $X_{i}$'s are defined over the range $(-\infty,\infty))$

enter image description here

Best Answer

You have the joint distribution $(X_{(n)}, X_{(1)})$ and you need to find the distribution of $X_{(n)} - X_{(1)}$. From the link you provided

$$ f_{1,n}(x,y) = n(n- 1) \dfrac{(y-x)^{n-2}}{\theta^{n-2}} \dfrac{1}{\theta^2}.$$

Let $y-x$ = $u$

$$ f_{1,n}(x,x+u) = n(n- 1) \dfrac{u^{n-2}}{\theta^{n-2}} \dfrac{1}{\theta^2}.$$

Now, I integrate out $x$ $$f_U(u) = \int_0^{\theta - u} n(n- 1) \dfrac{u^{n-2}}{\theta^{n-2}} \dfrac{1}{\theta^2} dx = n(n-1) \dfrac{u^{n-2}}{\theta^{n}} (\theta - u) $$

Now, \begin{align*} E(U) &= n(n-1) \int u \dfrac{u^{n-2}}{\theta^{n}}(\theta - u) du\\ & = \dfrac{n(n-1)}{\theta^{n}} \int u^{n-1}(\theta - u) du\\ & = \dfrac{n(n-1)}{\theta^{n}} \dfrac{\theta^{n+1}}{n(n+1)}\\ & = \theta\dfrac{n-1}{n+1} \end{align*}

I think your mistake was in finding the density for the range.

Related Question