# Joint PDF Integration

#### shrek

##### New Member
The joint pdf is

f(x,y) = e^(-y) , 0<=x<=y

I want to find the expected value of XY, so

E(XY) = DoubleIntegral[xye^(-y) dxdy]

What are the boundaries for this integration? My thinking is that

integrate x from 0 to y
integrate y from x to infinity

But my boundaries for y are incorrect. It should be

integrate y from 0 to infinity

Why?

#### mp83

##### TS Contributor
Well. the boundaries condition on x,i.e y can be anything in the real positive line (integrate y from 0 to infinity) but x would be the most equal to y (integrate x from 0 to y).

#### shrek

##### New Member
i don't understand what you're saying. can you tell me what's wrong with my rationale?

Well. the boundaries condition on x,i.e y can be anything in the real positive line (integrate y from 0 to infinity) but x would be the most equal to y (integrate x from 0 to y).

#### vinux

##### Dark Knight
What are the boundaries for this integration? My thinking is that

integrate x from 0 to y
integrate y from x to infinity

But my boundaries for y are incorrect. It should be

integrate y from 0 to infinity

Why?

:yup: . Because first integral it is X given Y so the range is 0 to y. I think you are clear on this.
In the second integral no conditional. It is in this way
E[XY] = E{ Y E[X/Y] }

The Logic is something like
Select two number X,Y such that X+Y = 10.
Here one of the vaiable(eg: X = m) can take any value . but other will be depended on ther ( Y = 10 -m).

I think this solves your confusion.

Regards
VinuX

#### shrek

##### New Member
i'm sorry but i still don't understand completely. can you explain the intuition in detail?

#### mp83

##### TS Contributor
OK. So to start with the condition is 0<=x<=y, this means that y is free of any restriction on x yet x is at most equal to y. Let's say that y is a fixed (but unknown number) y* on the (0,inf). Then x must be on the (0,y*] interval, so the initial condition still holds.

Therefor y->(0,inf) and x->(0,y]

#### shrek

##### New Member
using your rationale, why isn't the lower bound of y restricted by x?

y->[x,inf)

OK. So to start with the condition is 0<=x<=y, this means that y is free of any restriction on x yet x is at most equal to y. Let's say that y is a fixed (but unknown number) y* on the (0,inf). Then x must be on the (0,y*] interval, so the initial condition still holds.

Therefor y->(0,inf) and x->(0,y]

#### vinux

##### Dark Knight
ok.
you can calculate E(XY) in both ways
y->(0,inf) and x->(0,y]
or
x->(0,inf) and y->[x,inf)
Both the integrals will give the same answer.

#### shrek

##### New Member
why do you do this?

y->(0,inf) and x->(0,y]

y->(x,inf) and x->(0,y]

ok.
you can calculate E(XY) in both ways
y->(0,inf) and x->(0,y]
or
x->(0,inf) and y->[x,inf)
Both the integrals will give the same answer.

#### vinux

##### Dark Knight
why do you do this?

y->(0,inf) and x->(0,y]

y->(x,inf) and x->(0,y]
this looks very funny.

Suppose if we do that.. the expression of E(XY) in terms of x . It will be function of x.
So how will you interpret?

#### shrek

##### New Member
sigh. is there anyone who can understand my approach and explain to me intuitively why it's incorrect?

#### mp83

##### TS Contributor
You got to think that y is determined free of everything else.

If y had something like what you're suggesting then a conditional expectation would result, as Vinux hints.

#### Rounds

##### New Member
why do you do this?

y->(0,inf) and x->(0,y]

y->(x,inf) and x->(0,y]
When you understand the source of the double integral you will understand the answer.

There is a probability derivation which you have probably looked out. And there is a geometric interpretation in which the task becomes integrating a surface function over the area under the y=x line in the first quadrant to find a volume. So for that interpretation you imagine a cartesian plane and lieing above the cartesian plane is a density curve defined on the area under the y=x line to the y=0 line and we are interested in a volume with that area as its bottom. The integral is the same.

Last edited: