# Homework Help: Joint density function

1. Apr 12, 2015

### Dassinia

Hello,
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)=c*1(|y|<x<1) 1 is the indicator function

-Find c
-Find the marginal densities of X and Y
-Find the means, variances and the covariance
-Find conditional densities, means and variances of X given Y and of Y given X

2. Relevant equations
3. The attempt at a solution

The thing is I don't know how to deal with the |y| to find the limits of integration
For example to find c :
1=c∫∫f(x,y) dx dy
y goes from -∞ to 1
But for x ?

Thanks

2. Apr 12, 2015

### LCKurtz

Have you drawn a picture in the $xy$ plane of the region where $|y|<x<1$?

3. Apr 12, 2015

### Dassinia

No,
It gives a triangle with x from 0 to 1 and y from -1 to 1, so these would be the limits right ?
Thanks

4. Apr 12, 2015

### LCKurtz

It's a triangle alright. But constant limits like that would describe a rectangle.

5. Apr 13, 2015

### Dassinia

Of course
x from 0 to 1 and y from -x to x

6. Apr 13, 2015

### LCKurtz

Yes, assuming integration order $dydx$, that would cover the whole triangle. Of course, you will need to take a bit more care with the limits when you calculate the marginal densities.

7. Apr 13, 2015

### Dassinia

For the marginal densities:
fX(x)=∫ f(x,y) dy from -infinity to x
fX(x)=∫ c dy from -x to x
and
fY(y)=∫ f(x,y) dx from -infinity to y
fY(y)=∫ c dx from 0 to 1 it'd give 1 ???

Last edited: Apr 13, 2015
8. Apr 13, 2015

### LCKurtz

Before you start the marginal densities you should figure out the value of $c$ by setting $\int_{-\infty}^{\infty}\int_{-\infty}^{\infty} f(x,y)~dydx = 1$. Of course, you don't need infinite limits for this particular $f$, as you have noted above.

Then, when you do the marginal densities you need actual formulas for $f_X(x)$ and $f_Y(y)$. You need to work out the integrals and give formulas in $x$ or $y$ and indicating where they are zero. Show your work for them.

9. Apr 13, 2015

### Dassinia

1=∫∫ c dy dx with y from -x to x and x from 0 to 1
1=∫ 2x dx from 0 to 1
1=c
Marginal densities
fX(x)=∫ f(x,y) dy
fX(x)=∫ 1 dy from -x to x
fX(x)=2x
and
fY(y)=∫ f(x,y) dx
fY(y)=∫ 1 dx from 0 to 1
fy(y)=1 ? Or my limits of integration are false ?
Thanks

10. Apr 13, 2015

### LCKurtz

OK.

You have to define $f_X(x)$ for all $x$. It is only $2x$ for certain values of $x$. $f(x,y)$ isn't $1$ for all $x,y$.

Again, you have to define it for all $y$. And the integrand isn't $1$ for all $y$, and the limits depend on the value of $y$.

11. Apr 13, 2015

### Dassinia

fX(x)=2x when x ∈ [0,1]
and fX(x)=0 elsewhere

For the limits of the marginal density of Y, is it
fY(y)=∫ 1 dx from |y| to 1
fy(y)=1-|y| ? when y ∈ [-1;1]
fY(y)=0 elsewhere

12. Apr 13, 2015

### LCKurtz

Yes. Those are correct.

13. Apr 14, 2015

### Dassinia

I just have one last question
For the calculation of the conditional mean
E[X|Y]=∫ x * fX|Y(x|y) dx
=∫ x * f(x,y)/fY(y) dx
=∫ x * 1/(1-|y|) dx
Here for the limits of integration I took |y| to 1, is it correct ?
Thanks

14. Apr 14, 2015

### LCKurtz

That looks like a correct setup. What did you get for your final answer? By the way, it is easy to write integrals in Tex and you should learn to do it. Just right click on the expression below to see how it is done$$E[y|x] = \int_{|y|}^{1} \frac{x}{1-|y|}dx$$ Just surround it with a pair of ## or  depending on whether you want it on the same line or a separate line.