I would like to compute the conditional probability of throwing a dice. The event $A$ is getting 2 and the event $B$ is the number to be even, so the question is what is the probability of getting 2 given the output is even. $p( A = 2 | B = even)$. This is what I did
$$ p(A|B) = \frac{p(B|A)*p(A)}{p(B)} = \frac{1*(1/6)}{(1/2)} = \frac{1}{3} $$
is this correct? if so, is there another way to compute the conditional probability for this question? (Note: this is not homework)
That's correct. Another way:
$$ p(A|B) = \frac{p(A\cap B)}{p(B)} = \frac{1/6}{1/2} = \frac{1}{3} $$