6
$\begingroup$

$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

$\endgroup$
6
  • $\begingroup$ Where is the formula from? I don't recognize it. $\endgroup$ Commented May 3, 2016 at 11:48
  • $\begingroup$ @Greenparker Here is a link to the page (formula no. 10) giving the joint pdf of $X_{(1)},X_{(n)}$: link. I have then just used tranformations to get the CDF of $X_{(n)}-X_{(1)}$. I will also add my workings in the question. $\endgroup$ Commented May 3, 2016 at 14:18
  • $\begingroup$ @Greenparker The proof is a bit long-winded and my $Latex$ skills are not that good. I think I will just upload a picture of my workings. $\endgroup$ Commented May 3, 2016 at 14:25
  • $\begingroup$ I'm just thinking out loud, but is there a reason you didn't just use the linearity of expectation to parcel out $\mathbb{E}\left(X_{(n)}-X_{(1)}\right)$ as $\mathbb{E}\left(X_{(n)}\right)-\mathbb{E}\left(X_{(1)}\right)$? $\endgroup$
    – Sycorax
    Commented May 3, 2016 at 14:56
  • $\begingroup$ @C11H17N2O2SNa I just wanted to try an alternate method to solve the problem. Thought that this method might be a bit simpler than calculating the individual expectations. $\endgroup$ Commented May 3, 2016 at 16:17

1 Answer 1

7
$\begingroup$

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.

$\endgroup$
1
  • $\begingroup$ Just to follow-up, how would finding the expectation change if the range of U was -theta,theta. My current joint pdf of the range is very large and not sure if I am correct. $\endgroup$
    – lga
    Commented May 9, 2018 at 3:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.