# Conditional Probability of a continuous joint distribution function

#### h1a8

Problem Statement
For the following joint density
f(x,y)=3/4(2-x-y) for 0<x<2,0<y<2,x+y<2 and f(x,y) = 0 otherwise
1) What is the conditional probability P(X<1|Y<1)?
2) What is E[X|Y<1]?
Relevant Equations
1) P(A|B) = P(A and B)/P(B) or ∫_0^1▒∫_0^1▒〖f(x│y)dydx〗
for
2) E[X│Y]=∫_0^(2-y)▒〖x∙(f(x,y))/(f_Y (y))〗 dx
For 1) I found two ways but I get difference results.
The first way is I use P(A|B) = P(A and B)/P(B).
I get P(X<1|Y<1)=(∫_0^1▒∫_0^1▒〖3/4 (2-x-y)dydx〗)/(∫_0^1▒∫_0^1▒〖3/4 (2-x-y)dydx〗+∫_1^2▒∫_0^(2-x)▒〖3/4 (2-x-y)dydx〗)=6/7

The 2nd method is I use is
f(x│y)=f(x,y)/(f_X (x) )=(3/4(2-x-y))/(∫_0^(2-x)▒〖3/4(2-x-y)dy〗)=(2(2-x-y))/〖(2-x)〗^2 for 0<x<2

So P(X<1│Y<1)=∫_0^1▒∫_0^1▒〖2(2-x-y)/(2-x)^2 dydx〗=ln⁡(4)-1/2

For 2) I know that E[X│Y]=∫_0^(2-y)▒〖x∙(f(x,y))/(f_Y (y))〗 dx but I have no idea how to start E[X│Y<1]=∫_0^(2-y)▒〖x∙(f(x,y))/(f_Y (y))〗 dx
Im thinking of a double integral maybe.

Thanks!

#### Attachments

• 14.2 KB Views: 27
Related Calculus and Beyond Homework News on Phys.org

#### tnich

Homework Helper
For 1) I found two ways but I get difference results.
The first way is I use P(A|B) = P(A and B)/P(B).
I get P(X<1|Y<1)=(∫_0^1▒∫_0^1▒〖3/4 (2-x-y)dydx〗)/(∫_0^1▒∫_0^1▒〖3/4 (2-x-y)dydx〗+∫_1^2▒∫_0^(2-x)▒〖3/4 (2-x-y)dydx〗)=6/7

The 2nd method is I use is
f(x│y)=f(x,y)/(f_X (x) )=(3/4(2-x-y))/(∫_0^(2-x)▒〖3/4(2-x-y)dy〗)=(2(2-x-y))/〖(2-x)〗^2 for 0<x<2

So P(X<1│Y<1)=∫_0^1▒∫_0^1▒〖2(2-x-y)/(2-x)^2 dydx〗=ln⁡(4)-1/2

For 2) I know that E[X│Y]=∫_0^(2-y)▒〖x∙(f(x,y))/(f_Y (y))〗 dx but I have no idea how to start E[X│Y<1]=∫_0^(2-y)▒〖x∙(f(x,y))/(f_Y (y))〗 dx
Im thinking of a double integral maybe.

Thanks!
You might get a lot more responses to your posts if you made then in a readable form. Take a look at https://www.physicsforums.com/help/latexhelp/ for a simple way to do this. Your equations are almost there as you wrote them. You only need to enclose them in "\$$" and fix a couple of things and you have it. I did this with some of what you have written so I could read it and got this:$$P(X<1|Y<1)=\frac{(\int_0^1\int_0^1〖3/4 (2-x-y)dydx〗)}{(\int_0^1\int_0^1〖3/4 (2-x-y)dydx〗+\int_1^2\int_0^{2-x}〖3/4 (2-x-y)dydx〗)}=6/7f(x│y)=f(x,y)/(f_X (x) )=(3/4(2-x-y))/(∫_0^{2-x}〖3/4(2-x-y)dy〗)=(2(2-x-y))/〖(2-x)〗^2$$for 0<x<2 So$$P(X<1│Y<1)=∫_0^1∫_0^1〖2(2-x-y)/(2-x)^2 dydx〗=ln⁡(4)-1/2$$You can see what I did by right clicking on an equation and choosing "Show Math as>Tex Commands" from the menu. It won't show the "\$$" delimiters, but it will show everything else.

That said, your first method of solving for the conditional probability is correct. In the second one you assume that you can integrate $f(x|y)$ over $y$, and that is not correct.

Last edited:

#### Ray Vickson

Homework Helper
Dearly Missed
For 1) I found two ways but I get difference results.
The first way is I use P(A|B) = P(A and B)/P(B).
I get P(X<1|Y<1)=(∫_0^1▒∫_0^1▒〖3/4 (2-x-y)dydx〗)/(∫_0^1▒∫_0^1▒〖3/4 (2-x-y)dydx〗+∫_1^2▒∫_0^(2-x)▒〖3/4 (2-x-y)dydx〗)=6/7

The 2nd method is I use is
f(x│y)=f(x,y)/(f_X (x) )=(3/4(2-x-y))/(∫_0^(2-x)▒〖3/4(2-x-y)dy〗)=(2(2-x-y))/〖(2-x)〗^2 for 0<x<2

So P(X<1│Y<1)=∫_0^1▒∫_0^1▒〖2(2-x-y)/(2-x)^2 dydx〗=ln⁡(4)-1/2

For 2) I know that E[X│Y]=∫_0^(2-y)▒〖x∙(f(x,y))/(f_Y (y))〗 dx but I have no idea how to start E[X│Y<1]=∫_0^(2-y)▒〖x∙(f(x,y))/(f_Y (y))〗 dx
Im thinking of a double integral maybe.

Thanks!
The first method you used is correct; it uses the definition of conditional probability and correctly calculates all the needed quantities.

The second method seems to be some sort of mysterious new method that you invented for yourself, and as far as I can see makes no sense. $P(A | Y < 1)$ is not related in any simple way to $P(A|y)$

I did not look at your attachments, as I typically cannot get such things to open properly on my laptop and not open in any form at all on my i-phone. Just type out your work, as you have done, but take care to separate and label different parts of the calculation. Instead of trying to type out everything on one line, why not use some words and separate lines to clarify what you are doing? Instead of saying "I get P(X<1|Y<1)=(∫_0^1▒∫_0^1▒〖3/4 (2-x-y)dydx〗)/(∫_0^1▒∫_0^1▒〖3/4 (2-x-y)dydx〗+∫_1^2▒∫_0^(2-x)▒〖3/4 (2-x-y)dydx〗)=6/7", why not say
P(X < 1 and Y < 1) = int_{x=0..1} int_{y=0..1} f(x,y) dx dy = ..... (complete here).... and then, possibly on another line
P(Y < 1) = int_{x=0..1} int_{y=0..1} f(x,y) dx dy + int_{x=1..2} int_{y=0..2-x) f(x,y) dx dy = ...(complete here). Then, take the ratio to get the answer. No extra work involved, but a presentation that is much clearer and easier to follow.

Last edited:

#### tnich

Homework Helper
You might get a lot more responses to your posts if you made then in a readable form. Take a look at https://www.physicsforums.com/help/latexhelp/ for a simple way to do this. Your equations are almost there as you wrote them. You only need to enclose them in "\$$" and fix a couple of things and you have it. I did this with some of what you have written so I could read it and got this:$$P(X<1|Y<1)=\frac{(\int_0^1\int_0^1〖3/4 (2-x-y)dydx〗)}{(\int_0^1\int_0^1〖3/4 (2-x-y)dydx〗+\int_1^2\int_0^{2-x}〖3/4 (2-x-y)dydx〗)}=6/7f(x│y)=f(x,y)/(f_X (x) )=(3/4(2-x-y))/(∫_0^{2-x}〖3/4(2-x-y)dy〗)=(2(2-x-y))/〖(2-x)〗^2$$for 0<x<2 So$$P(X<1│Y<1)=∫_0^1∫_0^1〖2(2-x-y)/(2-x)^2 dydx〗=ln⁡(4)-1/2$$You can see what I did by right clicking on an equation and choosing "Show Math as>Tex Commands" from the menu. It won't show the "\$$" delimiters, but it will show everything else.

That said, your first method of solving for the conditional probability is correct. In the second one you assume that you can integrate $f(x|y)$ over $y$, and that is not correct.
For the second part, you need the conditional density f(x|Y<1). Your method 1 solution of the first part of the problem shows that you already know what it is. You have integrated it to calculate the conditional cumulative distribution function at x = 1.

"Conditional Probability of a continuous joint distribution function"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving