Expectation of the area of the triangle A point X is randomly chosen from the interval (0, a) of the x-axis and Y respectively from the
interval (0, b) of the y-axis. Suppose that X and Y are independent. Determine the expectation
of the area of the triangle OXY (O = origin).
My probability density function is ab/2? I have previously used Lebesgue integration to determine the expected value. However I do not understand how to use it when I have two unknown variables.
 A: The area of a triangle with the coordinates $(x_1,y_1), (x_2,y_2), (x_3,y_3)$ is
$$
S = \frac{1}{2} \left | x_1y_2 + x_2y_3 + x_3y_1 - y_1 x_2 - y_2x_3 - y_3x_1 \right |
$$
When you sample $X$ and $Y$, you will have a triangle with points $(0,0), (X,0), (0,Y)$, so you are interested in the random variable
$$
S = \frac{1}{2} |XY| = \frac{1}{2}XY
$$
since we are guaranteed that $X,Y$ are positive. Then by the independence, we simply have
$$
\mathbb{E}[S] = \frac{1}{2} \mathbb{E}[XY]=\frac{1}{2} \mathbb{E}[X] \mathbb{E}[Y] = \frac{1}{2} \frac{a}{2} \frac{b}{2} = \frac{ab}{8}.
$$
A: Define a random variable $A:(0,a)\times (0,b)\to \Bbb R$ by $$A(x,y)=\frac{xy}{2}.$$By definition, the expected value of $A$ is $$\Bbb E[A]=\int_0^a\int_0^b A(x,y)\,{\rm d}\Bbb P(x,y),$$where $\Bbb P$ is the Lebesgue probability measure on $(0,a)\times (0,b)$. But ${\rm d}\Bbb P = (ab)^{-1} {\rm d}x\,{\rm d}y$. Hence $$\Bbb E[A] = \frac{1}{ab}\int_0^a\int_0^b\frac{xy}{2}{\rm d}x\,{\rm d}y =\frac{1}{2ab}\frac{a^2}{2}\frac{b^2}{2} = \frac{ab}{8}.$$
