# Expected Value for variables $x_1<x_2<x_3$

Q) There are three-sample values $$x_1, x_2$$ and $$x_3$$ following P.D.F $$f(x_i) = 2x_i, (0 < x_i<1)$$ in $$(0,1)$$

Find the $$E(X)$$ for $$X=x_2$$ (Here the $$x_1 < x_2 < x_3$$ and $$x_i$$ are independent variables.)

Here is my attempt.

Since the $$x_i$$ are independent, $$f(x_1, x_2, x_3) = 8x_1x_2x_3$$

Say the $$f(x_2)$$ be P.D.F only for one variable $$x_2(=X)$$

Then $$f(x_2) = \int_{x_2} ^1 \int_{0}^{x_2} f(x_1, x_2, x_3) dx_1 dx_3 = 2X^3(1-X^2)$$

Hence, $$E(X) = \int_0 ^1 Xf(X) dX = {4 \over 35}$$

But the answer was $$24 \over 35$$

What the point do I have a mistake? I can't find what I've missed.

Thanks.

First, let's be careful with our notation. It's totally possible to define $$x_1, x_2, x_3$$ as independent random variables with the given density function. But if you do that, you can't enforce the condition that $$x_1 < x_2 < x_3$$, because this contradicts independence. Instead, the right idea is to define the order statistics, which are three other variables:

\begin{align*} x_{(1)} & := \min\{x_1, x_2, x_3\} \\ x_{(3)} & := \max\{x_1, x_2, x_3\} \\ x_{(2)} & := \text{(the other one)} \end{align*}

(It's possible to write down a definition for $$x_{(2)}$$, of course, but it's not really worth the effort as long as the meaning is clear.) Keeping the notation straight is important; the $$x_i$$ variables have the given density function and are independent of one another. The $$x_{(i)}$$ variables, though, are very much dependent on each other, and they do not have the original density function anymore. Intuitively, it should be clear that $$x_{(1)}$$ is much more likely to be found in, say, the interval $$[0, 0.1]$$ than $$x_{(3)}$$ is. These new variables are called the order statistics, and there is a long body of literature on how to deal with these.

The line in your solution that I don't understand is the line where you say

Then $$f(x_2) = \int_{x_2} ^1 \int_{0}^{x_2} f(x_1, x_2, x_3) dx_1 dx_3 = 2X^3(1-X^2)$$

and as far as I can tell, you may be making an error in conflating the difference between $$x_2$$ and $$x_{(2)}$$. You may have noticed that your answer was off by a factor of $$6$$; this is not an accident, and the factor of $$3!$$ comes from the ways to rearrange the three variables.

Hopefully I've said enough at this point to identify your mistake and point you on the right track; please let me know if not.

• Thanks for your Terrific answer! You pinpointed what I've missed Mar 24, 2020 at 22:26

You are dealing with order statistics here and should work e.g. with notation $$x_{(i)}$$ where $$\{x_1,x_2,x_3\}=\{x_{(1)},x_{(2)},x_{(3)}\}$$ and $$x_{(1)}.

Also in this answer we make use of the general rule that $$\mathbb EX=\int_0^{\infty}P(X>0)dx$$for non-negative random variable $$X$$.

Let $$N=\left|\left\{ i\in\left\{ 1,2,3\right\} \mid x_{i}\leq x\right\} \right|$$ so that $$\{x_{(2)}\leq x\}=\{N\geq2\}$$.

Here $$N$$ has binomial distribution with parameters $$n=3$$ and: $$p=P\left(x_{1}\leq x\right)=\int_{0}^{x}2ydy=x^{2}$$ so that:

$$P\left(x_{\left(2\right)}\leq x\right)=P\left(N=2\right)+P\left(N=3\right)=x^{6}+3x^{4}\left(1-x^{2}\right)=3x^{4}-2x^{6}$$

and applying the mentioned rule we find: $$\mathbb{E}x_{\left(2\right)}=\int_{0}^{\infty}P\left(x_{\left(2\right)}>x\right)dx=\int_{0}^{1}1-3x^{4}+2x^{6}dx=\left[x-\frac{3}{5}x^{5}+\frac{2}{7}x^{7}\right]_{0}^{1}=\frac{24}{35}$$

Define $$A=\{ X_1 < X_2 so I think you want to find $$E(X_2| X_1 < X_2

$$E(X_2| X_1 < X_2 Conditional_expectation_with_respect_to_an_event

$$P(A)=P(X_1 < X_2 and

$$E(X_2 1_{A})=E(X_2 1_{\{X_1 < X_2

$$= \iiint_{x_1

$$= \int_0^1 \int_{x_2}^1 \int_0^{x_2} x_2 f_{(X_1,X_2,X_3)}(x_1,x_2,x_3) dx_1 \, dx_2 \, dx_3$$ $$\overset{by \ your \ calculation}{=} \int_0^1 2x_2^4 (1-x_2^2) dx_2$$ $$= \frac{4}{35}$$

$$P(A)=P(X_1

since all of following event are equal (since $$X_i$$ are $$i.i.d$$) $$X_1 $$X_1 $$X_2 $$X_2 $$X_3 $$X_3

• What is the meaning of the $E(X_2 1_A)$? Mar 24, 2020 at 22:31
• $1_A$ is indicator function, that is, $1_A$ equals to 1 if $A$ happen and otherwise equals Zero. Mar 25, 2020 at 13:53