# Marginal Distribution from Conditional Distribution

I came across a problem where the marginal distribution of a random variable $Y$, $f(y) = c/y^2$ and $f(x|y) = 1/y$.

Can I simply multiply these two to get $f(x,y)$ the joint distribution of $X$ and $Y$, which in this case will be $c/y^3$. And then integrate it over all $Y$ to find the marginal distribution of $X$.

In effect, yes, $f(x,y)=f(x|y)f(y)$, which is essentially just elementary probability rules.

See the relevant section of Wikipedia's article on Conditional probability distribution.

However, you need to take proper care about the limits of $X|Y=y$ (and $Y$ for that matter), since that will define where $(X,Y)$ lives.

Were ranges given?

Then, yes, once you have the joint you could compute a marginal for $X$, but again, you must take care about the limits. Not dealing properly with them is perhaps one of the biggest sources of errors for beginners.

• So even for continuous random variables, probability density function f(x|y) can be multiplied by f(y) to get f(x,y)? Commented Oct 3, 2014 at 1:44
• See the link in the updated answer. Commented Oct 3, 2014 at 1:47
• Okay. Thanks! I checked the article on wikipedia. The conditional distribution of X given Y is Uniform on [0,y] and the marginal distribution of y exists only if y is greater than 2. So while calculating the joint, the only thing to keep in mind would be that it is valid for y > 2. Right? Commented Oct 3, 2014 at 1:52
• No, you also need to worry about the fact that $0\leq x\leq y$. This is important. The phrasing "marginal exists only if $y>2$" seems odd to me. Was a lower limit of $y$ given that was not 2? Commented Oct 3, 2014 at 1:53