Why is $P(A\mid B)=\sum_{i=1}^n P(AB_i\mid B)$? I am trying to show that, if $B_1,\ldots, B_n$ is a partition of $B$, then $$P(A\mid B)=P(A\mid B_1)P(B_1\mid B)+\cdots+P(A\mid B_n)P(B_n\mid B).$$
A hint given for solving this problem is that $$P(A\mid B)=\sum_{i=1}^n P(AB_i\mid B).$$
Why is this the case?
 A: $$
P(AB)=\sum_iP(AB_i)\implies\frac{P(AB)}{P(B)}=\sum_i\frac{P(AB_i)}{P(B)}\implies P(A|B)=\sum_i P(AB_i|B)
$$
with the last implication making use of $P(AB_i)=P(AB_iB)$.
A: To perhaps give this a bit of intuition, let's suppose that we're talking about rolling dice, and event $A$ is "rolls a total of 6", $B$ is "rolls between one and three dice", and $B_i$ is "rolls exactly $i$ dice".  Obviously, $B_1, B_2, B_3$ constitute a partition of $B$.
Then:


*

*$P(A, B_1 \mid B)$ is the probability that we roll $6$ on exactly one die, given that we roll one to three dice;

*$P(A, B_2 \mid B)$ is the probability that we roll $6$ on exactly two dice, given that we roll one to three dice; and

*$P(A, B_3 \mid B)$ is the probability that we roll $6$ on exactly three dice, given that we roll one to three dice.


It should be clear (or clearer, I hope) that if we add those probabilities together, we end up with exactly the probability $P(A \mid B)$ that we roll a $6$, given that we roll three or fewer dice.
