My Math Forum (http://mymathforum.com/math-forums.php)
-   Advanced Statistics (http://mymathforum.com/advanced-statistics/)
-   -   joint probability distribution. (http://mymathforum.com/advanced-statistics/345215-joint-probability-distribution.html)

 zollen October 27th, 2018 02:37 PM

joint probability distribution.

Let X be a random variable with values 0, 1 and 3, and let Y be a random variable with values -1, 1, 2, with the following joint distribution:

Code:

```                Y           -1    1    2     ----------------------     0 | 0.12  0.08  0.10 X  1 | 0.20  0.04  0.25     3 | 0.08  0.10  0.03 1) Compute the marginal distributions.         Marg-Dist(X) = { 0.3, 0.49, 0.21 }         Marg-Dist(Y) = { 0.4, 0.22, 0.38 } 2) Are X and Y independent? Justify your answer.         No. X and Y are not independent.         Recall If X and Y were independent, then P(X,Y) = P(X) * P(Y)         P(X=1) = P(X=1,Y=-1)+P(X=1,Y=1)+P(X=1,Y=2) = 0.20+0.04+0.25 = 0.49         P(Y=1) = P(Y=1,X=0)+P(Y=1,X=1)+P(Y=1,X=3) = 0.08+0.04+0.10 = 0.22         P(X=1,Y=1) = 0.04         P(X=1) * P(Y=1) = 0.49 * 0.22 = 0.1078         P(X=1,Y=1) <> P(X=1) * P(Y=1) 3) Compute Exp(X) and Exp(Y)         Exp(X) = Exp(X=0) + Exp(X=1) + Exp(X=3)                   = (-1)(0.12) + (1)(0.08) + (2)(0.10) +                             (-1)(0.20) + (1)(0.04) + (2)(0.25) +                             (-1)(0.08) + (1)(0.10) + (2)(0.03)                   = 0.58         Exp(Y) = Exp(Y=-1) + Exp(Y=1) + Exp(Y=2)                   = (0)(0.12) + (1)(0.20) + (3)(0.08) +                             (0)(0.08) + (1)(0.04) + (3)(0.10) +                             (0)(0.10) + (1)(0.25) + (3)(0.03)                   = 1.12 4) Compute the distribution of X + Y.         = { 0.12, 0.08, 0.10, 0.20, 0.04, 0.25, 0.08, 0.10, 0.03 } 5) Compute the joint distribution of X, Y.         See Ans 4. 5) Compute P(X|Y=2) and P(Y|X=1).         P(X|Y=2) = 0.1+0.25+0.03 = 0.38         P(Y|X=1) = 0.2+0.04+0.25 = 0.49```
Would anyone check my math please?? I am not sure I did it correctly...

 romsek October 27th, 2018 07:19 PM

You seem to have \$E[X]\$ and \$E[Y]\$ flipped.

let \$X=(0,1,3)\$

and the marginal of \$X\$ was computed correctly as \$p_X=(0.3, 0.49, 0.21 )\$

\$E[X] = X.p_X = 1.12\$

similarly \$E[Y]=0.58\$

 romsek October 27th, 2018 07:29 PM

For (4) you need to include the values.

5) you've done incorrectly. You should end up with 3 element distributions.

 zollen October 28th, 2018 03:08 AM

Quote:
 Originally Posted by romsek (Post 601676) For (4) you need to include the values. 5) you've done incorrectly. You should end up with 3 element distributions.
Would you provide the correct answers so I know what I did wrong?

Thanks!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

 zollen October 28th, 2018 07:03 AM

Code:

```4) Compute the distribution of X + Y. Answer: Dist(X + Y) = { P(X=0,Y=-1), P(X=0,Y=1), P(X=0,Y=2),                     P(X=1,Y=-1), P(X=1,Y=1), P(X=1,Y=2),                     P(X=3,Y=-1), P(X=3,Y=-1), P(X=3,Y=2) }               5) Compute P(X|Y=2) and P(Y|X=1). Answer: P(X|Y=2) = { 0.1, 0.25, 0.03 } P(Y|X=1) = { 0.2, 0.04, 0.25 }```
Better?

 romsek October 28th, 2018 09:04 AM

Quote:
 Originally Posted by zollen (Post 601690) Code: ```4) Compute the distribution of X + Y. Answer: Dist(X + Y) = { P(X=0,Y=-1), P(X=0,Y=1), P(X=0,Y=2),                     P(X=1,Y=-1), P(X=1,Y=1), P(X=1,Y=2),                     P(X=3,Y=-1), P(X=3,Y=-1), P(X=3,Y=2) }               5) Compute P(X|Y=2) and P(Y|X=1). Answer: P(X|Y=2) = { 0.1, 0.25, 0.03 } P(Y|X=1) = { 0.2, 0.04, 0.25 }``` Better?
does either of those "distributions" sum to 1?

 zollen October 28th, 2018 09:54 AM

If you were talking about question 5. No.
Let me think about it...

 romsek October 28th, 2018 10:26 AM

Quote:
 Originally Posted by zollen (Post 601695) If you were talking about question 5. No. Let me think about it...
hint - if you have a group of numbers you'd like to cast as a probability distribution how do you usually normalize them?

 zollen October 28th, 2018 11:21 AM

0.1+0.25+0.03=0.38
p(x|y=2) = { 0.1/0.38, 0.25/0.38, 0.03/0.38 }

0.2+0.04+0.25=0.49
p(y|x=1) = { 0.2/0.49, 0.04/0.49, 0.25/0.49 }

 romsek October 28th, 2018 11:43 AM

https://vignette.wikia.nocookie.net/...20100604214309

 All times are GMT -8. The time now is 07:16 PM.

Copyright © 2019 My Math Forum. All rights reserved.