# Joint PMF

1. Jul 26, 2013

### joemama69

1. The problem statement, all variables and given/known data

Roll a 6-sided die 5 times. Event X is when a 1,2,3 shows up. Event Y is when 4,5 show up. Show the joint PMF.

2. Relevant equations

3. The attempt at a solution

So... here is where im at...

X~Bin(5,0.5) & Y~Bin(5,1/3)

P(X=x)=(5 C x)(.5^5) & P(Y=y)=(5 C y)(1/3)^y (2/3)^(5-y)

Also the events are dependent... which is where my confusion comes from

Originaly I did not realize it was dependant and I found all the joint probabilities by doing p(x,y)=p(x)p(y), but this is not correct because you cannot have X=4 & Y=3

Then I tried conditional probabilitys...

P(X=x,Y=y) = P(x)*P(y|x)=(5 C x)(.5^5)*((5-x) C y)(1/3)^y (2/3)^(5-y)

but this is not working out either. What am I doing wrong. Am I missing something?

2. Jul 26, 2013

### Ray Vickson

I don't like your labelling of X the as occurrence of {1,2,3}. Instead, let X = number of tosses resulting in {1,2,3} and let Y = number of tosses resulting in {4,5}. So, X~Bin(5,1/2), and for each x ε {0,1,2,3,4,5}, Y|X=x is Bin(5-x,1/3).

Alternatively, you can say that Y ~ Bin(5,1/3) and for each y ε {0--5}, X|Y=y is Bin(5-y,1/2).

Either way, you can get p(x,y). It might prove instructive to show that both ways give you the same p(x,y).

Last edited: Jul 26, 2013
3. Jul 26, 2013

### joemama69

Ya I kinda short handed the problem. But so your saying I have the correct formula? Because when I applied it I didn't get a sum of marginal probabilities equal to 1. I even used excel to make sure there was not an error in arithmetic.

4. Jul 27, 2013

### Ray Vickson

You write "so your saying I have the correct formula?" I said nothing of the sort, and I don't know why you think I did. Read my posting again!

5. Jul 28, 2013

### joemama69

Ok so I tried to find it both ways but got different answers...

X~B(5,0.5), Y~ B(5-x,1/3), p(x,y)=p(x)p(y|x)=(5Cx)(0.5^5)*((5-x)Cy)((1/3)^y)((2/3)^(5-x-y))

... I thought this was the correct answer because all the marginal probabilities did sum to 1. But my professor disagreed.

so I tried ...
X~B(5-y,0.5), Y~ B(5,1/3), p(x,y)=p(y)p(x|y)=(5Cy)((1/3)^y)((2/3)^(5-y)*((5-y)Cx)((1/2)^x)(1/2)^(5-y-x))

... but did not get a sum of probabilities =1.

Are my formulas still wrong???

6. Jul 29, 2013

### Ray Vickson

Sorry: I tried to edit my previous posting but the system would not let me, and so I decided to wait until you responded before posting a new response (not being sure if you had or had not abandoned the topic).

I made a blunder before. Given {X=x}, the remaining tosses must result in outcomes {4,5,6}, and so the conditional probability governing Y is 2/3 (must get 4 or 5 from 4,5,6). That is, Y|X=x ~ bin(5-x,2/3). Similarly, X|Y=y ~ bin(5-y,3/4).

If you know about the multinomial distribution, this problem involves the trinomial case, because if we have {X=x, Y=y}, there must be Z = 5-x-y outcomes from the third set {6}. So we really have trinom(5;1/2,1/3,1,6):
$$P\{X = x, Y = y\} = P\{X = x, Y = y, Z = 5-x-y\} = {5 \choose x, y, 5-x-y} (1/2)^x(1/3)^y (1/6)^{5-x-y}.$$
Here
$${n \choose a,b,c} = \frac{n!}{a! b! c!}$$
is the trinomial coeffcient.

7. Jul 31, 2013

### joemama69

ok thanks, I finally got it right... Thank you