Suppose we know $P(A|C)$ and $P(C|B)$ and we want to find $P(A|B)$. What are the necessary conditions under which the $C$ "cancels out" and we have the equality $P(A|B)=P(A|C)P(C|B)$? I have found the following sufficient conditions for which the equality holds true:
- $P(AB|C)=P(A|C)P(B|C)\hspace{40 pt}$ ($A$ and $B$ are conditionally independent on $C$)
- $P(A|C^c)=0\quad\mbox{or}\quad{}P(B|C^c)=0\hspace{18 pt}$ (Either $A$ or $B$ is a subset of $C$)
Proof:
$$\begin{align}P(A|B)&=\frac{P(AB)}{P(B)}=\frac{P(AB|C)P(C)+P(AB|C^c)P(C^c)}{P(B)}=\frac{P(A|C)P(B|C)P(C)}{P(B)}&\\&=P(A|C)*\frac{P(BC)}{P(B)}=P(A|C)P(C|B)&\end{align}$$
Are my two conditions necessary conditions for the equality to hold true or are there more general conditions under which it holds?
EDIT:
Second condition should be: $AB$ is a subset of $C$, so $P(AB|C^c)=0$
Consider $A=\{1,2\}, B=\{2,3\}, C=\{2\}, C^{\complement}=\{1,3,4\}$. In this case, neither $A\subseteq C$ nor $B\subseteq C$, but $A\cap B\cap C^\complement=\emptyset$.
Rather, we have that $\mathsf P(A,B,C^\complement)=0$ when $A\cap B\subseteq C$ almost certainly.
Also:
$$\begin{align}\mathsf P(A,B,C)&=\mathsf P(A\mid B,C)\,\mathsf P(C\mid B)\,\mathsf P(B)&&\text{so if }A\perp B\mid C\text{ then }\ldots\\&=\mathsf P(A\mid C)\,\mathsf P(C\mid A,B)\,\mathsf P(B)&&\text{so if instead }A\perp C\mid B\text{ then }\ldots\end{align}$$