Let X and Y be independently random variables, with X uniformly distributed on [0,1] and Y uniformly distributed on [0,2] . Find the PDF fZ(z) of Z=max{X,Y}

find fZ(z)

1. For z<0 or z>2 :
2. For 0≤z≤1 :
3. For 1≤z≤2 :

3 answers

1. 0
2. z
3. 1/2
My guess, not too sure
2*z
z
0.5
My answer
i get :
0
1 because 1 is the max of (X,Y) during that interval
1/2

why do you guys get z?