Joint Density f(X,Y) integration when there is no Y in the eqn

#1
Hi I'm having difficulties with integration by parts when the main function of a joint distribution doesn't contain the Y. Here it is:

Let X and Y have a joint density given by f(X,Y)=a(1−X), 0≤X≤1,0≤Y ≤1
and zero elsewhere. Where, k is a constant.

(a) Find the value of a that makes this a probability density function. Use this
value for a in the pdf to work out the remaining questions.
(b) Find the marginal distribution of X and Y, i.e. f(X) and f(Y ).
(c) Find E(X), E(Y ), E(Y |X) and V ar(X|Y ).
(d) Find E[6X −12Y] and Var(2X −3Y)
(e) Find Cov(XY ) and the correlation ρxy
(f) Are X and Y independent? Show this using two alternative ways.

For part (a) I'm getting a value of a=-2 but I don't think that it's correct. I haven't moved any further in the question as all the others are dependent on this answer. Any help would be great!
 

Dason

Ambassador to the humans
#2
It seems to me you must have switched a negative somewhere. Notice that if a = -2 then for any (x,y) in the support of the distribution you have your joint density has a negative value. This can't happen.
 

Dason

Ambassador to the humans
#4
I don't quite get what's causing the problems I guess. Integrate with respect to x and then with respect to y?

[math] \int_0^1 \int_0^1 f(x,y) dx dy = \int_0^1 \int_0^1 a(1-x) dx dy [/math][math]= a \int_0^1 \int_0^1 (1-x) dx dy = a \int_0^1 1/2 dy = a/2 [/math]
 

Dason

Ambassador to the humans
#6
The step where I integrate with respect to x?

[math] \int_0^1 (1-x) dx = \left. x - (1/2)x^2 \right|_0^1 = (1 - 1/2) - (0 - 0) = 1/2 [/math]
 
#7
Wow, apparently I thought 1-1/2 = -1/2 weird. Big thanks. Another thing: In the case where I'm doing part a. Do I interpret the question as prove:
1. f(xy)>=0
2. \int_0^1 \int_0^1 f(xy)dxdy = 1

so that in part 2 - the part you explained to me, i would conclude 1 = a/2 Therefore a = 2?
 

Dason

Ambassador to the humans
#8
Wow, apparently I thought 1-1/2 = -1/2 weird.
No worries. It happens to the best of us. I once spent an additional hour working on a measure theory question because I couldn't get something to work out because I made the mistake of saying 1 + 1 = 1.

...

sad but true.
Big thanks. Another thing: In the case where I'm doing part a. Do I interpret the question as prove:
1. f(xy)>=0
2. \int_0^1 \int_0^1 f(xy)dxdy = 1

so that in part 2 - the part you explained to me, i would conclude 1 = a/2 Therefore a = 2?
It's not perfectly clear to me that the parts you're referencing are the same as they were in the first post but oh well. Essentially I think what you're saying is what you want to do. You need to show those two facts (always non-negative and integrates to 1) and that the value of a that gives you that is 2. You should be good to move on to the other parts after that.
 
#9
For part B of the question. How do I approach finding the marginal distribution f(X) and f(Y) when there isn't a Y in the equation?

For the marg distrn f(x) = inty a(1-x)dy I get = a(1-2x) as the marg distrbn. And I get a(1/2) as the marg distrbn of f(y)
 
Last edited:

Dason

Ambassador to the humans
#10
For part B of the question. How do I approach finding the marginal distribution f(X) and f(Y) when there isn't a Y in the equation?

For the marg distrn f(x) = inty a(1-x)dy I get = a(1-2x) as the marg distrbn. And I get a(1/2) as the marg distrbn of f(y)
Now that you know that a = 2 you should probably just replace any mention of a with 2. I don't quite understand what you're doing here:
nty a(1-x)dy I get = a(1-2x) as the marg distrbn

Remember that you're integrating with respect to y and anything without a y is just a constant. So 2(1-x) is just a constant so if you want you could do this:
[math] \int_0^1 2*(1 - x) dy = 2*(1-x) \int_0^1 1 dy = 2*(1-x) * (1-0) = 2*(1-x)[/math]
 
#12
Sorry. I'll try and make this more clear. Currently I'm working on these questions:

(b) Find the marginal distribution of X and Y, i.e. f(X) and f(Y ).
(c) Find E(X), E(Y ), E(Y |X) and V ar(X|Y ).

For (b) I did the following:

[math]
f(x) = \int_y f(x,y) dy = \int_y a(1-x) dy = a \int_y (1-x) dy = a \left. 1y-x \right|_0^1 = a(1-x-0-x)

[/math]
This simplifies to = a(1-2x) as the marginal distribution of X.

[math]
f(y) = \int_x f(x,y) dx = \int_x a(1-x) dx = a \int_x (1-x) dx = a \left. 1x-x^2/2 \right|_0^1

[/math]
This simplifies to = a[1-1/2-0-0] = a(1/2) as the marginal distribution of Y.

I'm completely unsure if I can do those operations though. Especially after reading your most recent suggestion.
 

Dason

Ambassador to the humans
#13
[math]
a \int_y (1-x) dy = a \left. 1y-x \right|_0^1 = a(1-x-0-x)

[/math]
Here is your problem. Remember that you're integrating with respect to y. This means x is a constant so
[math] 2 \int_0^1 (1-x) dy = \left. 2 * (1*y - x*y) \right|_0^1[/math]
 
#14
Ok that makes sense for the marginal distribution of X, but what about Y? I get the following for Y

[math]
f(y) = \int_x a(1-x) dx = 2 \int_0^1 (1-x) dx = 2(\left. 1x-x^2/2) \right|_0^1 = 2(1-1/2-0-0) =1
[/math]

So my question regarding the marginal distribution of Y is: Is it ok for it to just take the value 1? I thought it should be something with a variable in it.
 

Dason

Ambassador to the humans
#15
Well if you really want to be technical you do have a variable in there. It's really 1 times the indicator function that y is between 0 and 1. Y has a uniform distribution on [0,1] is all that that says.
 
#16
Ah ok, thank you! I'm on to part

(c) Find E(X), E(Y ), E(Y |X) and V ar(X|Y ).

I get the following for E(X) which I think is correct:
[math]
E(x)=\int_x xf(x) dx = \int_0^1 xa(1-x) dx = a \int_0^1 1x-x^2 dx = a \left. (1x^2/2 - x^3/3) \right|_0^1 = 1/3
[/math]

But when I do it for E(y) I run into a problem on the 6th step:
[math]
E(y)=\int_y yf(y) dy = \int_0^1 ya(1-x) dy = a\int_0^1 y(1-x) dy = a\int_0^1 (y-xy) dy
[/math]
[math]
= a \left.(y^2/2-xy^2/2) \right|_0^1 = a(1/2 - x1/2 - 0 - 0)
[/math]

I don't know what to do with the X in a(1/2 - x1/2 - 0 - 0). I need to solve for a single number for E(y) but the x is giving me problems.
 

BGM

TS Contributor
#17
You still have not get the correct marginal pdf for [math] Y [/math].

Note

[math] f_Y(y) = \int_{-\infty}^{+\infty} f_{X, Y}(x, y) dx
= \int_0^1 a(1 - x)dx, 0 < y < 1 [/math]

is independent of x, as you have already integrate the dummy variable [math] x [/math] out.

Actually, from the given joint density, without doing the integration you
can immediately tell [math] Y \sim \mathrm{Uniform}(0, 1) [/math]
and is independent from [math] X [/math].
 
#20
Ok, firstly, can [math]f(x,y) = a(1-x), 0=<X=<1, 0=<Y=<1 [/math] be seen to be uniform before any work is completed?

Which leads to my next question, how can I deduce that

Actually, from the given joint density, without doing the integration you
can immediately tell [math] Y \sim \mathrm{Uniform}(0, 1) [/math]
and is independent from [math] X [/math].
What is the process to come to that result?

Lastly, would the marginal distribution of Y then simply be
[math]
f(y) = a(1-x)
[/math]