# Let $A, B$ be random variables. Does $P(A|B)=1-P(\overline{A}|B)$?

Say I have discrete random variables $$A$$ and $$B$$. Is it true that $$P(A|B)=1-P(\overline{A}|B)$$?

My intuition is conflicting; it makes sense that if $$P(A|B)=p$$, then it is only possible that $$P(\overline{A}|B)=1-p$$ and vice versa, since the probability of not A given B and the probability of A given B must add to 1 since there are no other options. However, my intuition is usually wrong with probability, things are rarely as they seem. Can anyone give me insight into this?

Yes this is true. If B is the condition that must occur in both cases, then it sort of becomes irrelevant, because cases where B does not occur can be ignored. In this case, we can look at the space of outcomes where B occurs, within which there are two options: A and not A. Therefore these probabilities must add to 1.

• thank you, that makes more sense now! Commented Apr 20, 2020 at 23:19
• An intuitive way of looking at it: conditioning on $B$ means your "world" is smaller: you're only looking at the events where $B$ occurred. All the usual rules of probability still apply in the smaller world. Commented Apr 21, 2020 at 1:38
• As a related question but for 3 variables, if $A$ and $B$ are conditionally independent given $C$, does this imply $P(A=a|B=b, C=c) = P(A=a|B=\overline{b}, C=c)$? Commented Apr 21, 2020 at 3:03
• @ajax2112 Well based on such an approach of 'intuitive reasoning' it should also be true that $P(A|B) = 1 - P(A|\bar{B})$, no? Because you have only two options, either $B$ occurred or it did not occur... ;-) Commented Apr 22, 2020 at 7:25

I like the other answer (+1) as it is simple and based on intuition. This can also be demonstrated using relatively simple probability rules.

\begin{align*} P(\bar A | B) &= \frac{P(\bar A\cap B)}{P(B)} \\[1.2ex] &= \frac{P(B) - P(A\cap B)}{P(B)} \\[1.2ex] &= 1 - \frac{P(A\cap B)}{P(B)} \\[1.2ex] &= 1 - P(A|B) \\[1.2ex] &\square \end{align*}

Claim: If $$A$$ and $$B$$ are conditionally independent given $$C$$, then $$P(A|B\cap C) = P(A|\bar{B}\cap C)$$.
Again, this can be demonstrated using only simple probability rules. The idea is, once we know that $$C$$ occurred, the probability of $$A$$ "doesn't care" whether or not $$B$$ occurred. So we will demonstrate this by showing both the LHS and RHS are equal to $$P(A|C)$$.
\begin{align*} P(A|B\cap C) &= \frac{P(A\cap (B\cap C))}{P(B\cap C)} \\[1.2ex] &= \frac{P(A\cap B | C)P(C)}{P(B\cap C)} \\[1.2ex] &= \frac{P(A|C)P(B|C)P(C)}{P(B|C)P(C)} && \text{(conditional independence)} \\[1.2ex] &= P(A|C) \end{align*}
The RHS is slightly trickier. We use the fact $$P(E\cap \bar F) = P(E) - P(E\cap F)$$ several times.
\begin{align*} P(A|\bar B\cap C) &= \frac{P(A\cap (\bar B\cap C))}{P(\bar B\cap C)} \\[1.2ex] &= \frac{P(A\cap C) - P(A\cap B \cap C)}{P(C) - P(B\cap C)} \\[1.2ex] &= \frac{P(A|C)P(C) - P(A\cap B | C)P(C)}{P(C) - P(B|C)P(C)} \\[1.2ex] &= \frac{P(A|C) - P(A|C)P(B|C)}{1 - P(B|C)} && \text{(conditional independence)} \\[1.2ex] &= \frac{P(A|C)(1-P(B|C)}{(1-P(B|C)} \\[1.2ex] &= P(A|C) \end{align*}
• Thank you! As a related question but for 3 variables, if $A$ and $B$ are conditionally independent given $C$, does this imply $P(A=a|B=b, C=c) = P(A=a|B=\overline{b}, C=c)$? Commented Apr 21, 2020 at 3:03