# Joint and Marginal PDF from figure

I am practicing probability questions for my exam. I came across this question. joint pdf

X and Y are two random variables with joint PDF uniform over the shaded area in the image.

a) What would be joint PDF expression?

b) Marginal PDFs of X and Y

c) E[X + Y]

d) Let Z be the event {Y>1}. Find the conditional PDF fX|Z(x|Z)

e) Comparing the conditional PDF fX|Z(x|Z) with the marginal pdf of fZ(z), is it implied that the random variables X and Y are independent? Explain.

For part (a), do I need to find the equation of the triangles?

For part (b), what I understand is that once I have the expression for the joint pdf I have to integrate for all Y to get marginal of X and vice versa.

I am clueless about parts c, d and e.

• I am unable to post the image because my reputation is less than 10. The link however works. Oct 25, 2017 at 7:00

You're on the right track with a and b. For c, you can use linearity: $E[X+Y] = E[X]+E[Y]$. When you have the marginals these expectations are just single integrals. Alternatively, you can calculate $E[X+Y]$ from the joint distribution as
$$E[X+Y] = \int\int (x+y) f_{X,Y} (x,y) dx dy$$
For d, calculate $P(Z)$. Then the joint distribution of $X$ and $Y$ is given by the pdf $\frac{I_Zf_{X,Y}}{P(Z)}$, where $I_Z$ is the indicator for $Z$ (one where $Z$ is true, zero elsewhere). Calculate the marginal of $X$ from this.
In e, I think $f_X(x) ($marginal pdf of $X$) is meant instead of $f_Z(z)$ ($Z$ is an event, not a random variable). Notice that the distributions $f_{X|Z}$ and $f_{X}$, even if they're the same, don't imply that $X$ and $Y$ are independent. For independence you need $f_{X|Y} = f_X$ or equivalently $f_{X,Y} = f_Xf_Y$.
It is clear from the joint distribution that in fact $X$ and $Y$ aren't independent: if $Y=1$, $X$ must be $1$, but if $Y=2$, $X$ is uniform over $[0,1]$. Hence knowing $Y$ gives information about $X$.