# Finding marginal density functions

1. Dec 9, 2012

### CAF123

1. The problem statement, all variables and given/known data
The joint probability density function of $X$ and $Y$ is given by $$f(x,y) = \frac{1}{8}(y^2 - x^2)e^{-y},\,\,\,\, x \in\,[-y,y]\,\,,y \in\,(0, \infty)$$

Compute the marginal densities of $X$ and $Y$.

3. The attempt at a solution
I know the defintions are $$F_X(x) = \int_{- \infty}^{\infty}\,f(x,y)\,dy\, \text{and}\, F_Y(y) = \int_{- \infty}^{\infty}\,f(x,y)\,dx.$$

Am I correct in saying that if the domains of x and y are just numbers then the limits on the integrals are the endpoints of these domains? I.e if in the example above $x \in\, [2,4], \,\,\text{and}\,\, y\,\in\,[1,3] F_Y(y) = \int_2^4 f(x,y)\,dx,\,\,\text{while}\,\, F_X(x) = \int_1^3 f(x,y)\,dy$, right?

However, in this case, the domain of x depends on y. So x is less than y=x and greater than y = -x. Drawing this, I see it is the portion enclosed by x = |y|, but above the x axis (since y is greater than 0). Hence, to get the limits when computing $F_X(x)$, I should say y is from x to infinity. When I check the answers, they have y from |x| to infinity. Can't I replace |x| = x since y is above 0? Or did I miss something else? Many thanks

2. Dec 9, 2012

### Ray Vickson

Two points.
(1) You should use the notations $f_X(x)$ instead of $F_X(x)$, etc., because F looks like a cumulative distribution function. In probability is is common to use small letters for densities or probability mass functions and capital letters for (cumulative) distribution functions.
(2) Always draw a picture when evaluating 2D integrals. If you draw the allowable combinations of x and y, everything will become clear.

3. Dec 9, 2012

### CAF123

I forgot the portion on the left hand side - it's clear now. I have a conceptual question: what does a marginal density actually mean?

4. Dec 9, 2012

### Ray Vickson

The marginal density of X is just the probability density of X. The random variable X may be one component of a much more extensive list (or vector) of properties, but we are just ignoring those other components (if any) when we look at the marginal. In your case, X is the first component of a vector (X,Y), but when we look at the marginal density of X we are ignoring Y. Isn't all this explained in your textbook? If not, I am very surprised.

5. Dec 10, 2012

### CAF123

I see. My book did contain that, however it is more geared toward giving examples rather than explaining the theory so that might be why I missed it first time. From this same question, I asks to compute $E[X]$. I know this is equal to $\int_{-∞}^{∞} x f_X(x) dx$, so can I write this as $\int_{-y}^y x f_X(x) dx$. In the book, they take the limits of integration as 0 to ∞. Why is this? I know x is from -y to y, so can't x take on negative values too? (If y = 5, say, then x is from -5 to 5?). It would seem to me that the limits be from -∞ to ∞?

6. Dec 10, 2012

### Ray Vickson

The two integrals
$$\int_{-∞}^{∞} x f_X(x) dx$$
and
$$\int_{-y}^y x f_X(x) dx$$
are not equal. Why would you think they are the same?

7. Dec 10, 2012

### CAF123

The former integral is if x is not restricted to any domain and the latter if it is. No?

8. Dec 10, 2012

### Ray Vickson

No, not in this problem. When you talk about f_X there is no y anywhere; y is gone.

9. Dec 10, 2012

### CAF123

Oh, pardon me, what a mistake to make. The expectation should be a number, not a function. But why are the limits from 0 to ∞?

10. Dec 10, 2012

### Ray Vickson

I said it before, and I will say it again one more time: draw a diagram! This will show the region in the (x,y) plane where f_{XY}(x,y) > 0.

11. Dec 10, 2012

### CAF123

I did draw a diagram but the region -y < x < y is the region above y = |x| in the xy plane. That's why I think the limits are from -∞ to ∞ for x. I don't know why x is resticted from 0 to ∞. To get that case, we would need x > |y| I think.

12. Dec 10, 2012

### Ray Vickson

The function f_X(x) = f(x) is symmetric, so the integral of x*f(x) from -inf to +inf is zero; that is, EX = 0. The integral of x*f from 0 to +inf is positive, so it looks like they are computing (1/2) E|X|.

13. Dec 10, 2012

### CAF123

The answer in the back of the book is that EX = 0. Does this mean that the limits are actually -∞ to ∞? When I check the solutions, they compute the integral from 0 to ∞, yet still get 0 (When I work it through, I get 3/4, which as you said is indeed positive).

14. Dec 10, 2012

### Ray Vickson

You can have EX = 0 without having limits of -∞ and +∞---that is a whole separate issue. The question is: what are the limits in THIS problem? Well, can you have values of x > 100? can you have x < -1000? x > 100,000,000? Is there ANY M > 0 that has P{X > M} = 0 and P(X < -M} = 0? If you think there is, please tell me a suitable value of M. If there is no such value of M, what is that telling you? (I am sure you already know the answer; it just seems to be the case that you lack confidence in your own answers.)

15. Dec 11, 2012

### CAF123

There is no such M. As long as x lies between -y and y. And since y is from 0 to infinity, the value of x can take any value in (-∞, ∞).