Expect value of two continuous random variable

117 Views Asked by At

Suppose that $X$ and $Y$ are continuous random variable, distributed in the range [0,1], that is, $\rho_X(x) = 1$ and $\rho_Y(y) = 1$. If, $f(X_i,Y_i)=|X_i-Y_i|$, how to calculate $\langle \sum_i f(X_i,Y_i) \rangle = \langle \sum_i |X_i-Y_i| \rangle$?

By definition, I know that:

$\langle |X-Y| \rangle = \int \int dx dy |X-Y| \rho_X(x) \rho_Y(y) = \int \int dx dy |X-Y|$

I tried to make a change of variable with $Z = |X_i-Y_i|$, so, $F_Z(z) = 1 - (1-z)^2$, $\rho_Z(z) = 2(1-z)$

$\int \int dx dy |X-Y| = \int dz \rho_Z(z)z = 2\int dz(1-z)z=\frac{1}{3} $

My point is, the index $i$ interferes with something in the results, since we have a sum of random variables, and yet, is it correct to make a transformation from a double integral to a single?

1

There are 1 best solutions below

1
On BEST ANSWER

You can define $Z=|X_i-Y_i|$ as you did and find its distribution to do a single integral. That is probably the easiest way, if you know how to find the distribution of $Z$.

Another option is to split up the original integral depending on where $X_i-Y_i\geq 0$ and where $X_i-Y_i <0$: \begin{align*} \int_0^1\int_0^1 |x-y| \ dy \ dx &= \int_0^1 \int_0^x (x-y) \ dy \ dx + \int_0^1\int_x^1(y-x) \ dy \ dx\\ &=\int_0^1xy-\frac{y^2}{2}\Big|_0^x \ dx+\int_0^1 \frac{y^2}{2}-xy\Big|_x^1 \ dx\\ &=\int_0^1 x^2 - \frac{x^2}{2} \ dx + \int_0^1 \frac{1}{2}-x-\left(\frac{x^2}{2}-x^2\right) \ dx\\ &=\int_0^1 x^2-x+\frac{1}{2} \ dx\\ &= \frac{x^3}{3}-\frac{x^2}{2}+\frac{x}{2}\Big|_0^1\\ &=\frac{1}{3}. \end{align*}