# How can I get probability for an interval with continuous marginal probability function?

Let's say, I have joint probability function as follows:

$$f(x,y) = 4xy$$ for $$0 \le x \le 1$$ and $$0 \le y \le 1$$

I want to get the marginal probability distribution of the random variable $$X$$ from the joint probability distribution. So I integrate out the other random variable $$Y$$. Then I get

$$f_X(x) = \int_{0}^{1} 4xy dy = [2xy^2]_{0}^{1} = 2x$$

How can I use the resulted probability distribution function to find a probability between an interval of the random variable $$X$$? Do I need to integrate the resulted function for some specific probability density between an interval of the random variable $$X$$?

Yes, for example, $$P(0 as expected. Note that $$f(x)=0$$ when $$x<0$$ or $$x>1$$.
• Thank you for the answer. If possible, could I ask why we integrate with respect to the random variable of $Y$? I can understand the mathematical way to get the marginal probability distribution function. Mathematically we can get rid of the other random variable but I just can't visualize the way we integrate out the random variable of $Y$. Aug 31, 2020 at 12:05
• Think about the discrete version: $$P(X=x)=\sum_y P(X=x, Y=y)$$ where the probability of $X=x$ is equal to the probabilities of all the events that the other RV is equal to some value with $x$ being constant Aug 31, 2020 at 12:12