$P(A_0 | A_n)$ in a Bayesian network where $A_n → ... → A_0$

17 Views Asked by At

I asked a question here about C given A in a Bayesian network where $A→B→C$. According to this answer,

$$P(C=1∣A=1)=P(C=1∩B=1∣A=1)+P(C=1∩B=0∣A=1)$$ if A, B, C have a Bernouilli distribution.

So in the case of $$P(A_0 | A_n)$$ where $$A_n → ... → A_0$$ and $A_i$ has a Bernouilli distribution, what would be the generalized equation for N variables? Sorry if this can be found online, I'm not sure what is the correct terms to search

Thanks

1

There are 1 best solutions below

0
On BEST ANSWER

Well to start, that answer may be taken further

$$\begin{align}\mathsf P(C{=}1\mid A{=}1)&=\mathsf P(C{=}1\cap B{=}1\mid A{=}1)+\mathsf P(C{=}1\cap B{=}0\mid A{=}1)\\[1ex]&=\mathsf P(C{=}1\mid B{=}1)\mathsf P(B{=}1\mid A{=}1)+\mathsf P(C{=}1\mid B{=}0)\mathsf P(B{=}0\mid A{=}1)\\&= \sum_{b\in\{0,1\}} \mathsf P(C{=}1\mid B{=}b)\mathsf P(B{=}b\mid A{=}1)\end{align}$$

Which for the DAG of $A_2\to A_1\to A_0$ will give

$$\begin{align}\mathsf P(A_2{=\,}a_2\mid A_0{=\,}a_0)&= \sum_{a_1\in\{0,1\}} \mathsf P(A_2{=\,}a_2\mid A_1{=\,}a_1)\mathsf P(A_1{=\,}a_1\mid A_0{=\,}a_0)\\[1ex]&=\sum_{a_1\in\{0,1\}}\prod_{i=1}^2\mathsf P(A_i{=\,}a_i\mid A_{i-1}{=\,}a_{i-1})\end{align}$$

And so, by extension...

$$\mathsf P(A_n{=\,}a_n\mid A_0{=\,}a_0)=\sum\limits_{\small\langle a_1,\ldots,a_{n-1}\rangle\in\{0,1\}^{n-1}}\prod\limits_{i=1}^{n}\mathsf P(A_i{=\,}a_i\mid A_{i-1}{=\,}a_{i-1})$$