# How to assign values over this two variables A and B in an apocryphal "Bayesian Network" like A->B->A?

Let's say that we have a graph A->B->C, and its coditional independence representation is like follows:

| a0   | a1      |
|:-----|--------:|
| 0.6  | 0.4     |

| A    | P(b0|A) | P(b1|A) |
|:-----|--------:|--------:|
| a0   | 0.30    | 0.70    |
| a1   | 0.20    | 0.80    |

| B    | P(c0|B) | P(c1|B) |
|:-----|--------:|--------:|
| b0   | 0.20    | 0.80    |
| b1   | 0.90    | 0.10    |


This graph is valid since every probability is non-negative and the sum of the graph distribution is 1: $$P(A, B, C)=P(A)P(B|A)P(C|B)=0.6*0.3*0.2+0.6*0.3*0.8+\cdots + 0.4*0.8*0.9+0.4*0.7*0.1=1$$

But what if I change the C to A? The first two probability tables don't change:

| a0   | a1      |
|:-----|--------:|
| 0.6  | 0.4     |

| A    | P(b0|A) | P(b1|A) |
|:-----|--------:|--------:|
| a0   | 0.30    | 0.70    |
| a1   | 0.20    | 0.80    |


But how to draw the third one?

| B    | P(a0|B) | P(a1|B) |
|:-----|--------:|--------:|
| b0   | 0.60    | 0.40    |
| b1   | 0.60    | 0.40    |


I am wonder if it is an infinit loop and the probability tables are not possible for such graphs. Any suggestions are hight appreciated. Thanks.

• What do you mean by changing $C$ to $A$? Are you asking $P(A|B)$ when the network is still in the same form, i.e. $A\rightarrow B\rightarrow C$ Commented Jan 24, 2019 at 12:44
• @gunes I want to see what would happen. I want to make sure the network will be invalid if I substitute C by A(indicating the network has changed). If P(A|B) is just P(A) the sum would be larger than 1, I thought. Commented Jan 24, 2019 at 13:14
• I think it would lead to an endless loop and the joint distribution would be summed larger than 1. Commented Jan 25, 2019 at 2:18

When you construct a network in the form $$A\rightarrow B\rightarrow C$$, since every node depends on only its parents, by definition the joint probability is written as $$P(A,B,C)=P(A)P(B|A)P(C|B)$$. When we set $$C=A$$, i.e. form a cyclic relationship, this formula turns into $$P(A,B,A)=P(A,B)=P(A)P(B|A)P(A|B)$$ Here, $$P(A)P(B|A)=P(A,B)$$, then to satisfy the equation it should be $$P(B|A)=1$$, assuming non-zero probabilities. Conversely thinking, we'll have $$P(A|B)=1$$. If they're both $$1$$, then $$P(A,B)=P(A)$$, which means $$B=A$$ or $$A$$ and $$B$$ are deterministic, i.e. with probability $$1$$, e.g. The world is spinning.