I have a function $f_{x,y}(x,y)$ which represents the joint density function. In order to get marginal density function in terms of $x$, I need to integrate using $y$ bounds. Why is that? I assumed that we would integrate with $x$ bounds.
Asked
Active
Viewed 65 times
2
-
Welcome to math.SE! While your particular question is clear as is, since you do not require many equations, it is considered good practice to use Mathjax for their readability. – Felix Benning Dec 02 '21 at 20:56
1 Answers
3
For intuition it is often good practice to use discrete probabilities instead of continuous densities. Integrating is just a form of summation. Now if you had the following matrix
| sick | healthy | |
|---|---|---|
| Test positive | 0.09 | 0.1 |
| Test negative | 0.01 | 0.8 |
then getting the probability of someone being sick ($X\in\{\text{sick},\text{healthy}\}$) requires summing over the different test cases ($Y\in\{\text{positive},\text{negative}\}$) $$ P_X(\text{sick}) = \sum_{y\in\{\text{positive},\text{negative}\}} P_{X,Y}(\text{sick}, y) = 0.09 + 0.01 = 0.1. $$ More generally we have $$ P_X(x) = \sum_{y\in\{\text{positive},\text{negative}\}} P_{X,Y}(x, y), $$ which works the same for densities $$ f_X(x) = \int f_{X,Y}(x,y) dy $$
Felix Benning
- 2,889