$X,Y\sim U(0,1)$ are independent, $W=\max (X,Y)$.
- How do I find the PDF of $W$?
- How do I find the expectation of $W$ at two ways: 1. with the PDF of $W$ and without the PDF of $W$.
I ask this Q before few days, but now I want show you me solution and ask if it's right (and ask to tell me where I wrong):
We assume that $0<t<1$ becuase otherwise the function $(f)$ returns 0.
1. Lets say: $W=\max(X,Y)\Rightarrow W(t)=P(t>X)\cdot P(t>Y)=(1-P(t<X))(1-P(t<Y))$ because they are independent.
We know that $P(t<X)=F_X(t)=t$ (Because $X\sim U(0,1)$), and this is why: $F_W(t)=(1-t)^2$ (if $0<t<1$ otherwise is $0$).
So $f_W(t)=F'_W(t)=2t-2$.
2:
a. $$E(W(t))=\int _{0}^1 t\cdot f_W dt=\int_0^12t^2-2tdt=\left[\frac{2t^3}{3}-\frac{2t^2}2\right]^1 _0$$
I dot here something negative and I don't know why...
Please tell me where my mistake here....
b.
Here I'll show you the idea, and I'd like to know if I'm right...
$$\iint_{D_1}\max(X,Y)dxdy+\iint_{D_2}\max(X,Y)dxdy \\= \iint_{D_1}xdxdy+\iint_{D_2}ydxdy$$
I'm right? If I'm wrong please tell me where are my mistakes (at all the question).
Thank you!