How to get the marginal density function of dependent random variables

358 Views Asked by At

I am unsure how to get the marginal probability density function if the two random variables are dependent.

In general for given $f_{XY}(x,y)$ we get $$f_X(x)=\int_{-\infty}^{+\infty}f_{X,Y}(x,y)dy\tag1$$and $$f_Y(y)=\int_{-\infty}^{+\infty}f_{X,Y}(x,y)dx\tag2$$ However I am unsure what happens if e.g. $x$ depends on $y$. Consider this example $$ f_{XY}(x,y) = \begin{cases} x+y& \text{ for } y\geq x\geq0, y\geq0 \\ 0 & \text{ otherwise } \end{cases} $$ Then we get $$f_Y(y)=\int_{0}^{+\infty}(x+y)dx = \frac{x^{2}}{2}+xy$$ but what will I get for $f_{X}(x)$ ?

Edit: To clarify this question, would the "easiest" solution $$f_X(x)=\int_{0}^{y}(x+y)dy $$ be a valid solution?

1

There are 1 best solutions below

4
On BEST ANSWER

Consider the following example

$$ f_{XY}(x,y) = \begin{cases} 2(x+y)& \text{ for } 1\geq y\geq x\geq0 \\ 0 & \text{ otherwise } \end{cases} $$

this is similar to yours but now $f_{XY}(x,y)$ is a nice density...

to obtain the marginals let's focus on the ${X,Y}$ domain

and consider that the rv $X$ takes values in $(0;y)$

$$\underbrace{0<x<y}_{\text{X-integration bounds}}<1$$

while the rv $Y$ takes values in $(x;1)$

$$0<\underbrace{x<y<1}_{\text{Y-integration bounds}}$$


thus to calculate the marginals you can do

$$f_X(x)=\int_x^1 f(x,y)dy$$

$$f_Y(y)=\int_0^y f(x,y)dx$$