# Joint PDF of two continuous random variables

## Homework Statement

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)##

## Homework 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

## 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!

Related Engineering and Comp Sci Homework Help News on Phys.org

From my text:
For two RV's x and y, we define CDF ##F_{xy}(x,y)## as follows

$$F_{XY}(x,y)=P(X≤x \ and \ Y≤y)$$

and the joint PDF ##p_{xy}(x,y)=\frac{\delta^{2}}{\delta_{x}\delta_{y}}F_{XY}(x,y)##
Then I see the this which may be relevant:
for observing x from ##-\infty \ to \ \infty##

$$\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}p_{XY}(x,y)dxdy=1$$
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.

A Rayleigh RV can be derived from two independant Gaussiaon RV's as follows. Let x and y be independent Gaussian variables with identical PDF's

$$p_X(x)=\frac{1}{\sigma \sqrt{2 \pi}}e^{-x^2/2 \sigma^2}$$
$$p_Y(y)=\frac{1}{\sigma \sqrt{2 \pi}}e^{-y^2/2 \sigma^2}$$
$$p_{XY}(x,y)=p_{x}(y)p_Yy)= \frac{1}{2 \pi \sigma^2}e^{-(x^2+y^2)/2 \sigma^2}$$
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.

I like Serena
Homework Helper

## Homework Statement

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)##

## Homework 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

## 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!
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:
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...

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:
I like Serena
Homework Helper
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
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.

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..

I like Serena
Homework Helper
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$$

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$$
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..

I like Serena
Homework Helper
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..
This is correct. You can also replace the remaining u(x) by 1 now, since x is always positive in the remaining integral.

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?

I like Serena
Homework Helper
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?
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.

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...

I like Serena
Homework Helper
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...
What's the derivative of ##e^{-x^2}##?

##\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:
I like Serena
Homework Helper
##\frac{d}{dx}(e^{-x^2})=-2xe^{-x^2}##
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)##?

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..
You're right. This does not work.

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...

I like Serena
Homework Helper
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.

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.

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

ughhh.. yes I see it now.

Thank you for being patient and painfully breaking this down for me.

I do appreciate it! ...on to the next few problems :)

Just to be sure i fully understand I tried doing the other integral from the original problem involving ##e^{-x^2}##

##u=e^{\frac{-y^2}{2}}##

##\int ye^{\frac{-y^2}{2}}dy##
##=\int (-1)-ye^{\frac{-y^2}{2}}dy##
##=\int (-1)du##
##=-1u=-e^{\frac{-y^2}{2}}##

Anyway. Thanks again!

I like Serena
Homework Helper
Yep! You've got it!