0
$\begingroup$

Is there a way to calculate P(A|C) from P(A, B|C)? I'm guessing that the following will only work when A and B are conditionally independent: P(A, B|C) = P(A|C)P(B|C).

$\endgroup$
16
  • 5
    $\begingroup$ Ignore the conditioning on $C$ for a moment. How does one in general get a marginal distribution $P(A)$ from a joint distribution $P(A,B)$? One ``integrates out" the dependence on $B$, which, in the case of a discrete probability, just means you sum over all the possible values of $B$, that is $P(A) = \sum_B P(A,B)$. The same principle still holds even if you do it conditionally: $P(A|C) = \sum_B P(A,B|C)$. $\endgroup$ Apr 26 at 17:52
  • 1
    $\begingroup$ Not sure what to say to that last comment other than...its wrong? Maybe you are thinking about similarity to equation (ignoring $C$) $P(A,B) = P(A|B)P(B)$ $\endgroup$
    – bdeonovic
    Apr 26 at 18:57
  • 1
    $\begingroup$ The version of that equation that would be right could be $P(A|C) = \sum_B P(A|B,C)P(B|C)$, which is just using the fact that $P(A,B|C) = P(A|B,C)P(B|C)$, which again, is the analogue to the not-conditional-on-$C$ fact that $P(A,B) = P(A|B)P(B)$ as stated above. $\endgroup$ Apr 27 at 13:24
  • 1
    $\begingroup$ Why not link to the paper itself and identify the equation within it? The context can help us to explain the intended meaning. $\endgroup$ Apr 28 at 14:50
  • 2
    $\begingroup$ @Namenlos I can't agree with your claim that "Nothing else (e.g., the paper) is relevant." In particular, the statement that $P(A) = \sum_B P(A,B|B,C)P(B)$ is patently false (in the first place, I am not entirely sure what is even meant by $B$ being on both sides of the conditioning statement), and it is unclear to myself (and presumably to others) what might lead one to write such an expression. The context of the paper is thus helpful for sorting these questions out. For example, is the equation a typo? Or is it based on some misunderstanding which context will elucidate? $\endgroup$ Apr 29 at 2:55

1 Answer 1

3
$\begingroup$

Ignore the conditioning on $C$ for a moment. How does one in general get a marginal distribution $P(A)$ from a joint distribution $P(A,B)$? One "integrates out" the dependence on $P(B)$, which, in the case of a discrete probability, just means you sum over all the possible values of $B$, that is $P(A) = \sum_B P(A,B)$. The same principle still holds even if you do it conditionally: $P(A|C) = \sum_B P(A,B|C)$. Some equivalent ways of expressing this last sum are possible by factorizing $P(A,B|C)$ further either as $P(A|B,C)P(B|C)$ or as $P(B|A,C)P(A|C)$ (again, these are the conditional analogues of the fact that $P(A,B) = P(A|B)P(B) = P(B|A)P(A)$): $$P(A|C) = \sum_B P(A,B|C) = \sum_B P(A|B,C)P(B|C) = \sum_B P(B|A,C)P(A|C)$$.

In the comments, there was a question about the equation $P(A|C) = \sum_B P(A,B|B,C)P(B)$. To begin, the expression $P(A,B|B,C)$ is quite strange. Formally, one could interpret it as $P(A,B|B,C) = P(A|B,C)$, since $P(B|B,C) = 1$, but in that case it seems unnatural to write it in such a redundant/convoluted way. Even ignoring this issue, the expression is still wrong in general. In general, it is difficult to explain why a wrong expression is wrong, since the burden of proof is on the asker to specify why they would think the expression might be true in the first place. However, the following counterexample at least shows that it is indeed wrong. Let $A$ be the result of a biased coin flip which is 1 with probability 1/3, and let $B$ be the result of an independent biased coin flip with $B=1$ with probability 1/3, and let $C$ be the sum of the two flips. Consider now, $P(A=1|C=1)$. Clearly, $C=1$ happens only if $A=1$ and $B=0$ or $B=1$ and $A=0$, so by Bayes's rule, $P(A=1|C=1)=1/2$. On the other hand, we have $P(A=1|B=1,C=1) = 1/3$, $P(A=1|B=0,C=1)= 1$, which implies $$\sum_B P(A=1|B,C=1)P(B) = \underbrace{P(A=1|B=1,C=1)P(B=1)}_{=0} + \underbrace{P(A=1|B=0,C=1)}_{=1}\underbrace{P(B=1)}_{=1/3} = 1/3 \neq 1/2$$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.