# Computing conditional probability out of joint probability

If I have given a complete table for the joint probability $$P(A,B,C,D,E)$$ how can I compute an arbitrary conditional probability out of it, for instance: $$P(A|B)$$

-

$$\mathbb{P}(A=a \vert B=b) = \frac{\mathbb{P}(A=a, B=b)}{\mathbb{P}(B=b)} = \frac{\displaystyle \sum_{c,d,e} \mathbb{P}(A=a, B=b, C=c, D=d, E=e)}{\displaystyle \sum_{a,c,d,e} \mathbb{P}(A=a, B=b, C=c, D=d, E=e)}$$
The short answer for your example is that you can compute $P(A,B)$ and $P(B)$ from the table (you have to sum out all the other variables for fixed A and B). Using these values you can compute $P(A|B)$.
For instance for $A = a$ and $B = b$ it would be: $$P(A = a, B = b) = \sum_{C,D,E} P(A = a, B = b, C, D ,E)$$? –  Mahoni May 21 '12 at 18:49