I'm struggling with the following question:
Let's say we have a random variable X with the PDF $f(x) = 3x^2$ for $0 \leq x \leq 1$, and $0$ otherwise. Let's say we also have a random rectangle whose sides are of length $X$ and $1-X$, then what is the expected value of the rectangle's area?
Are we simply supposed to begin by finding $E[X]$, then just use the expected value to perform the multiplication to find the rectangle's area? Or do I have this all wrong? This is what I tried so far:
$$E[X]=\int_{x=0}^{x=1}x(3x^2) dx=\frac{3}{4}$$ Therefore, expected area of triangle = $E[X(1-X)] = E[X-X^2]=E[X]-E[X^2]$
Is this right so far? If not, where did I go wrong? If so, how do I find $E[X^2]$? Thanks a lot.
You are doing fine.
$$E[X^2]=\int_{x=0}^{x=1} x^2(3x^2) \, dx$$
In general,
$$E[f(X)]=\int_{x=0}^{x=1} f(x)(3x^2) \, dx$$