# Finding the joint distribution of two dependent variables

Let $$X$$ and $$Z$$ be independent random variables with X uniformly distributed on $$(−1, 1)$$ and $$Z$$ uniformly distributed on $$(0, 0.1)$$. Let $$Y = X^2 + Z$$. Then $$X$$ and $$Y$$ are dependent.

Find the joint pdf of $$X$$ and $$Y$$.

The correct solution is $$5$$ for $$-1 and $$x^2 and $$0$$ otherwise.

I do notice that this is the same as the joint distribution of $$X$$ and $$Z$$ since $$X$$ and $$Z$$ are independent, however I do not understand how they got $$X$$ and $$Y$$ to equal that.

I initially started trying to find the pdf of $$Y$$ which is the pdf of $$X^2 + Z$$ by finding the cdf of $$(X^2 + Z \le a)$$ and then taking the derivative to arrive at the the pdf. However, this method seems to involve finding the cdf for three sample spaces $$(0 within a rectangle $$(0,0), (0, .1), (1, .1), (1, 0)$$ and leaves me with a pdf involving the variable $$a$$ for each sample space, which would 1. not fit the correct solution and 2. still leave me unable to derive the joint distribution from the marginal distribution, since they are dependent. What is the method used here?

The right method is conditioning (on $$X$$), $$f_{X,Y}(x,y)=f_{Y|X}(y|x)f_X(x)$$ Given $$X=x$$, $$Y=Z+x^2$$, so the conditional PDF $$f_{Y|X}(\cdot|x)$$ is PDF $$f_Z(\cdot)$$ shifted right by $$x^2$$, $$f_{Y|X}(y|x)=f_Z(y-x^2)$$ and finally $$f_{X,Y}(x,y)=f_{X}(x)f_Z(y-x^2)$$