# Joint PDF of two continuous random variables

1. Apr 1, 2013

### Evo8

1. The problem statement, all variables and given/known data

The joint PDF (probability density function) $p_{X,Y}(x,y)$ of two continuous random variables by:
$$p_{X,Y}= Axy e^{-(x^2)}e^{\frac{-y^2}{2}}u(x)u(y)$$

a) find A
b) Find $p_X (x), \ p_{y}, \ p_{X|Y}(x|y), and \ p_{Y|X}(y|x)$

2. Relevant equations

The first coulpe pages of this presentation has some information on this form. http://berlin.csie.ntnu.edu.tw/Courses/Probability/2011Lectures/PROB2011F_Lecture-09-Continuous%20Random%20Variables%20-Conditioning,%20Expectation%20and%20Independence.pdf

3. The attempt at a solution

Im stuck on part A. This is somewhat similar to my last question in a previous thread. I just dont see how to solve for A. My text book has some examples of very similar form but the contant A is not present. Im not sure why they provide an example one way and then ask questions of a different way. To spark your thinking I guess.

I do know I have to mess around with some double integrals and what not but I need to resolve the unknown constant A first.

Any hints are greatly appreciated!

Thanks!

2. Apr 1, 2013

### Evo8

From my text:
Then I see the this which may be relevant:
In addition there is a section that talks about Rayleigh random variables. I know my problem statement doest not mention Rayleigh but i wasnt sure if maybe it applies here.

Unfortunately im still stuck on how to find A. Im 90% certain its something simple and im just not seeing it...

Thanks again for any help.

3. Apr 1, 2013

### I like Serena

Hi Evo8!

To find A you need to use that the total probability is 1.

In other words:

$$\int \int p_{X,Y}dxdy= \int \int Axy e^{-(x^2)}e^{\frac{-y^2}{2}}u(x)u(y)dxdy = 1$$

Can you calculate that integral?

Last edited: Apr 1, 2013
4. Apr 1, 2013

### Evo8

Hi ILS!

This makes sense. To answer your question on weather or not I can evaluate the integral the answer is not right now. I will do some searching and try to refresh my memory...

5. Apr 2, 2013

### Evo8

Ok im stuck on the calculus here... I know this isnt really the calc form but I think only a small hint will get me back on track.

Ive reviewed double integrals and I think I understand/remember this process. I get stuck on evaluating the first integral (integrating the function with respect to x. I think I need to integrate by parts. I have reviewed this process and no problems there if i only had 2 terms to deal with. Here I have four. I havent seen how I can apply integration by parts successfully to 4 terms.

My first integral I need to evaluate so far is $A\int xy e^{-(x^2)}e^{\frac{-y^2}{2}} u(x)$'

Am I on the right path here?

EDIT:

So I see how to do integration by parts with 3 terms. You basically group two of the terms together and integrate by parts several times. With 4 terms I image i do the same but have 2 groups of 2 terms and perform an integration on each then back to the original.

Can I rearrange my function like this? $A\int xe^{-(x^2)} \ ye^{\frac{-y^2}{2}}u(x)$

So I would split the x and y terms up and then have to do integration by parts on each term?
Seems like a lot for something that doesnt look so complicated. Ill try to work through the math in the mean time.

Im just thinking out loud here I guess..

Thanks again for the help

Last edited: Apr 2, 2013
6. Apr 2, 2013

### I like Serena

Yes. You can split the integral.

$$\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} Axy e^{-(x^2)}e^{\frac{-y^2}{2}} u(x)u(y)dxdy = A\int_{-\infty}^{\infty} x e^{-(x^2)} u(x) dx \int_{-\infty}^{\infty} ye^{\frac{-y^2}{2}} u(y) dy$$

Now you need to get rid of those u(x) and u(y) first.
After that you can do integration by parts.

7. Apr 2, 2013

### Evo8

For some reason I was under the impression that the u(x) and u(y) were instead of dx dy. Looking back it makes now sense. I guess I dont see what I can do to "get rid" of them though.. Would I want to move them over to the other side of the equation? I dont see how that would help though..

8. Apr 2, 2013

### I like Serena

You are aware that u(x) is the step function?
It is zero if x<0 and one if x>0.

You can write
$$\int_{-\infty}^{\infty} f(x)u(x)dx = \int_{-\infty}^{0} f(x)u(x)dx + \int_{0}^{\infty} f(x)u(x)dx$$

9. Apr 2, 2013

### Evo8

I'm aware now.. hmm im trying to follow here.

From what you have stated above about the unit step function regarding my u(x) only I have something like this written down

$$\int_{-\infty}^{\infty} xe^{-(x^2)}u(x)dx=\int_0^{\infty} xe^{-(x^2)}u(x)dx \ +0$$

Im fairly confident im not looking at this correctly though since that doesn't mathematically agree..

10. Apr 2, 2013

### I like Serena

This is correct. You can also replace the remaining u(x) by 1 now, since x is always positive in the remaining integral.

11. Apr 2, 2013

### Evo8

hmm ok.

So what I have written down now is:

$$A \int_0^{\infty}xe^{-(x^2)}dx \int_0^{\infty}ye^{\frac{-y^2}{2}}dy=1$$

So I can now solve for both of those integrals separately using integration by parts and then input the results. Rearrange to solve for A?

I didnt think I could split the double integral up like that though. I thought I had to solve the inner integral and then solve the outter?

12. Apr 2, 2013

### I like Serena

In this case you can split it like this.
You can move expressions out of the integral as long as they don't change with respect to the variable that you're integrating.
Note that an integral is really a summation.
It obeys the same rules other summations do.

For instance:
$$Ax_1 + Ax_2 + Ax_3 = A(x_1 + x_2 + x_3)$$
and
$$x_1f(y) + x_2f(y) + x_3f(y) = (x_1 + x_2 + x_3)f(y)$$
So you can move A or f(y) outside.

But:
$$x_1f(x_1) + x_2f(x_2) + x_3f(x_3) \ne (x_1 + x_2 + x_3)f(x)$$
So you cannot move f(x) outside.

13. Apr 2, 2013

### Evo8

Ok I see why it works for this case. Thanks for breaking it down for me.

Im attempting the integrals now and Im not sure how to "legally" deal with integrating $e^{-(x^2)}$

I can use my calculator to solve the integrals individually and then evaluate at the limits and end up with

$$A \frac{1}{2} + 1 = 1$$

Solve for A and get $A=\frac{2}{3}$

If im correct in my thinking anyway. However id like to gain the understanding and practice of integrating by hand...

14. Apr 2, 2013

### I like Serena

What's the derivative of $e^{-x^2}$?

15. Apr 2, 2013

### Evo8

$\frac{d}{dx}(e^{-x^2})=-2xe^{-x^2}$

Im not sure if this really works but can I get something like this?

$$\int e^{-x^2} = \frac{-1}{2x}e^{-x^2}$$

I dont think that really follows the product rule though..

Last edited: Apr 2, 2013
16. Apr 2, 2013

### I like Serena

Good!

Now perhaps you can use the substitution $u=e^{-x^2}$?

Or otherwise use $dv = -2xe^{-x^2}$ in integration by parts $\left( \int u dv = uv - \int v du \right)$?

You're right. This does not work.

17. Apr 4, 2013

### Evo8

you mention to use $dv=-2xe^{-2}$ im ultimately trying to solve the following $\int e^{-x^2}$ for integration by parts using the formula you posted above am I working backwards?
I tried playing with a few different combinations of u and dv and I dont see how it works out.

Wouldn't I be better off by assigning u to be $u=e^{-x^2}$? since I can find my du. In this case I would assume $v=1$. However when I try this it doesnt really work out either.

It doesn't seem like a hard integral to solve however i cant find a combination that works. Also after a bunch of research online there are quite a few that say there is not good solution to this. I see where they are coming from but I dont see why...

18. Apr 5, 2013

### I like Serena

There is no solution to $\int e^{-x^2}dx$, but there is a solution for $\int xe^{-x^2}dx$.

Let's try substituting $u=e^{-x^2}$.
Then we also have $du=-2xe^{-x^2} dx$.

$\int xe^{-x^2}dx = \int -\frac 1 2 \cdot -2xe^{-x^2}dx = \int -\frac 1 2 du = -\frac 1 2 u + C = -\frac 1 2 e^{-x^2} + C$

Taking the derivative of the right hand side confirms that we get the original integral expression.

19. Apr 5, 2013

### Evo8

Maybe its the algebra hanging me up now.

Once you get $\int - \frac{1}{2} -2xe^{-x^2} dx$ I see how you substitute the du in then integrate ending with a u term then plugging the original back in.

I cant figure out how you get the following $\int xe^{-x^2} dx=\int -\frac{1}{2}-2xe^{-x^2} dx$

since I have $du=-2e^{-x^2} dx$ I thought maybe you rearranged for x on the left and side giving you the $\frac{1}{2}$ but then you end up with $x= -\frac{1}{2} \frac{du}{dxe^{-x^2}}$

I also looked at rearranging for dx to give you $dx=-\frac{1}{2} \frac{du}{xe^{-x^2}}$ but That doesnt really work out either, plus theres still an x on the right hand side.

What am I missing here. Something simple no doubt.

20. Apr 5, 2013

### I like Serena

Your problem seems to be that you omitted the multiplication sign.
$$-\frac 1 2 \cdot -2 = 1$$