# Computing Posterior Probability

I'm new to all of this, so please give explanations with answers. My goal is to learn it. I've given the start of a first attempt below.

Suppose that X (Boolean true, false) influences another Random Variable, Y (3-valued 1,2 and 3), in the following way:

P(Y=1|x) = 0.2
P(Y=2|x) = 0.4
P(Y=1|~x) = 0.6
P(Y=2|~x) = 0.3


Compute the posterior probabilities.

From above we can tell that P(Y=3|x) = 0.4 and P(Y=3|~x)=0.1. I'm not really sure where to go from here.

EDIT 1: First full on attempt If I make the assumption that X has a 50/50 chance of being true/false...

P(Y=3|x) = 0.4 and P(Y=3|~x)=0.1
P(Y=1) = (0.2 + 0.6) / 2.0 = 0.4
P(Y=2) = (0.4 + 0.3) / 2.0 = 0.35
P(Y=3) = (0.4 + 0.1) / 2.0 = 0.25
P(X | Y=1) = P(Y=1|X) p(X) / p(Y=1) = 0.2 * 0.5 / 0.4 = 0.25
P(X | Y=2) = P(Y=2|X) p(X) / p(Y=2) = 0.4 * 0.5 / 0.35 = 0.57
P(X | Y=3) = P(Y=3|X)p(X) / P(Y=3) = 0.4 * 0.5 / 0.25 = 0.8


Are those bottom 3 values (0.25, 0.57, and 0.8) my posterior probabilities?

• That is about as far as you can go without more information, such as prior probabilities of $x$ or $Y$. – Graham Kemp Dec 1 '14 at 21:30
• Is X 50/50 to be true or false? – turkeyhundt Dec 1 '14 at 21:31
• I'm going to assume it is a 50/50. I made it a bit further with that assumption. I've added the potential solution to the question. Is that correct? – CamHart Dec 1 '14 at 21:34
• I think you got it with your answers. – turkeyhundt Dec 1 '14 at 21:41

If X is 50/50 to be TRUE or FALSE, then you can chart out all the possibilities.

X,Y,Total Probability

TRUE1:$\space0.5\times 0.2=0.1$

TRUE2:$\space0.5\times 0.4=0.2$

TRUE3:$\space0.5\times 0.4=0.2$

FALSE1:$\space0.5\times 0.6=0.3$

FALSE2:$\space0.5\times 0.3=0.15$

FALSE3:$\space0.5\times 0.1=0.05$

So, given $Y=1$, what is the fraction of that result that came from X being TRUE and what is from X being FALSE?