Question 1171015
Let's find the expected value of $|Y - X|$ given the joint pdf $f(x, y) = \frac{1}{2}$ for $0 \le y \le x$ and $0 \le x \le 2$.

**1. Set up the Integral**

We need to compute the integral:

$$E[|Y - X|] = \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} |y - x| f(x, y) \, dy \, dx$$

Given the bounds, we have:

$$E[|Y - X|] = \int_{0}^{2} \int_{0}^{x} |y - x| \cdot \frac{1}{2} \, dy \, dx$$

**2. Simplify the Absolute Value**

Since $y \le x$, we have $y - x \le 0$, so $|y - x| = -(y - x) = x - y$.

$$E[|Y - X|] = \int_{0}^{2} \int_{0}^{x} (x - y) \cdot \frac{1}{2} \, dy \, dx$$

**3. Evaluate the Inner Integral**

$$\int_{0}^{x} (x - y) \, dy = \left[xy - \frac{y^2}{2}\right]_{0}^{x} = x^2 - \frac{x^2}{2} = \frac{x^2}{2}$$

**4. Evaluate the Outer Integral**

$$E[|Y - X|] = \int_{0}^{2} \frac{x^2}{2} \cdot \frac{1}{2} \, dx = \frac{1}{4} \int_{0}^{2} x^2 \, dx = \frac{1}{4} \left[\frac{x^3}{3}\right]_{0}^{2} = \frac{1}{4} \cdot \frac{8}{3} = \frac{2}{3}$$

**Therefore, E[|Y - X|] = 2/3.**