Marginal distribution can't seem to work

94 Views Asked by At

Given $$D = \{(x,y)\in R^2:0\leq y \leq 1-|x| \}$$

And joint distribution function:

$$ f_{X,Y}(x,y) = \begin{cases} 1 & (x,y)\in D \\ 0 & else \end{cases} $$

The exercise itself doesn't require to do that, but I tried to compute the marginal density functions of X and Y, just for practice, though something seems odd.

I started by plotting the region D:

plot

And worked by definition:

$$ f_Y(y)=\int_{\infty}^{\infty}f_{X,Y}(x,y)dx=\int_{y-1}^{y+1}f_{X,Y}(x,y)dx = y+1-(y-1)=2 $$

$$ f_X(x)=\int_{\infty}^{\infty}f_{X,Y}(x,y)dy $$

$$ x<0: \\ f_X(x)=\int_{0}^{x+1}f_{X,Y}(x,y)dy=x+1 \\ x\geq 0: \\ f_X(x)=\int_{0}^{x-1}f_{X,Y}(x,y)dy=x-1 $$

So:

$$ f_X(x) = \begin{cases} x+1 & x<0 \\ x-1 & x\geq 0 \end{cases} $$

Are these correct? because I couldn't find a way to validate them. When I tried to integrate those densities over the whole region I got values $\ne1$ which implies that these are not valid density functions.

What have I done wrong?

2

There are 2 best solutions below

2
On BEST ANSWER

$f_{Y}$ is right, but $f_{X}$ isn't.

$$f_{X} = \int_{0}^{1 - |x|} 1 \mathop{dy}$$

0
On

For $f_Y$ you should integrate from $y-1$ to $1-y$ (not $1+y$) when $0\leq y\leq 1.$

Your $f_X$ is correct for $-1\leq x\leq 0,$ but for $0<x<1$ you have it “backwards”: you should have $1-x$ rather than $x-1.$ Note that $x-1$ is negative in that interval so it cannot possibly be a correct probability. Also note that the density is zero if $x<-1$ or $x>1.$

Note that it is possible for the integral to be $1$ even if you compute the wrong probability, so this is only a partial verification.