# Thread: Help with conditional probability of joint density functions.

1. ## Help with conditional probability of joint density functions.

Let X and Y be continuous random variables with joint density function
$\displaystyle f(x,y)=\left\{\begin{array}{lr}(24xy)&0< x< 1;0< y<1-x\\0&otherwise\end{array}\right.$

How would you determine the correlation coefficient, say p, and then calculate the conditional probability of P [ Y < X | X= .5 ]

thank you for your help times infinity!

2. $\displaystyle Cov(X,Y) = E(XY) - E(X)E(Y)$

$\displaystyle \rho = \frac{Cov(X,Y)}{\sigma_X\sigma_Y}$

Figure out the expectation the joint distribution.

$\displaystyle E(XY) = \int_0^1\int_0^{1-x}xyf(x,y)dydx$

Figure out the conditional distributions of X and Y.

$\displaystyle f_X(x) = \int_0^{1-x}f(x,y)dy$

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

Figure out the expectation of X and Y.

$\displaystyle E(X) = \int_0^1 xf_X(x)dx$

$\displaystyle E(Y) = \int_0^{1-x} yf_Y(y)dy$

Figure out the variance of X and Y.

$\displaystyle \sigma_X^2 = E(X^2) - [E(X)]^2$

$\displaystyle \sigma_Y^2 = E(Y^2) - [E(X)]^2$

Plug in the appropriate functions and now you have correlation.

3. Originally Posted by BERRY
$\displaystyle Cov(X,Y) = E(XY) - E(X)E(Y)$

$\displaystyle \rho = \frac{Cov(X,Y)}{\sigma_X\sigma_Y}$

Figure out the expectation the joint distribution.

$\displaystyle E(XY) = \int_0^1\int_0^{1-x}xyf(x,y)dydx$

Figure out the conditional distributions of X and Y.

$\displaystyle f_X(x) = \int_0^{1-x}f(x,y)dy$

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

Figure out the expectation of X and Y.

$\displaystyle E(X) = \int_0^1 xf_X(x)dx$

$\displaystyle E(Y) = \int_0^{1-x} yf_Y(y)dy$

Figure out the variance of X and Y.

$\displaystyle \sigma_X^2 = E(X^2) - [E(X)]^2$

$\displaystyle \sigma_Y^2 = E(Y^2) - [E(X)]^2$

Plug in the appropriate functions and now you have correlation.
one question...

When you figure out the conditional distributions of X and Y.

should it be

$\displaystyle f_Y(y) = \int_0^{1-x}f(x,y)dx$
not

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

and also,
when you figure out the variance of X and Y.

$\displaystyle \sigma_Y^2 = E(Y^2) - [E(Y)]^2$
not
$\displaystyle \sigma_Y^2 = E(Y^2) - [E(X)]^2$ right?

4. Originally Posted by Statsnoob2718
one question...

When you figure out the conditional distributions of X and Y.

should it be

$\displaystyle f_Y(y) = \int_0^{1-x}f(x,y)dx$
not

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

and also,
when you figure out the variance of X and Y.

$\displaystyle \sigma_Y^2 = E(Y^2) - [E(Y)]^2$
not
$\displaystyle \sigma_Y^2 = E(Y^2) - [E(X)]^2$ right?
For the variance of Y, I mistyped it. You're correct.

For the conditional of Y, you integrate over x (thus the dx) and x ranges from 0 to 1 so the original is correct.

5. Oh, cool dude, yeah I just drew a picture of the bounds to confirm, you're right about the limits. Great work!

6. Originally Posted by Statsnoob2718
one question...

$\displaystyle f_Y(y) = \int_0^{1-x}f(x,y)dx$
not

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

Both are wrong

A function of y cannot have x in it.
The correct marginal is

$\displaystyle f_Y(y) = \int_0^{1-y}f(x,y)dx$

just like

$\displaystyle f_X(x) = \int_0^{1-x}f(x,y)dy$

7. Likewise the E(Y) is wrong here

$\displaystyle E(X) = \int_0^1 xf_X(x)dx$

$\displaystyle E(Y) = \int_0^{1-x} yf_Y(y)dy$.
$\displaystyle E(Y) = \int_0^{1} yf_Y(y)dy$

IF you want to obtain the marginal density.
But it's better to look at this two dimensionally...

$\displaystyle E(Y) = \int_0^{1} yf_Y(y)dy =\int_0^{1} y\int_0^{1-y}f(x,y)dxdy=\int_0^{1} \int_0^{1-y}yf(x,y)dxdy$

Because you have the choice of which variable you can integrate first

$\displaystyle E(Y) = \int_0^{1} \int_0^{1-x}yf(x,y)dydx$