# How to eliminate graph cycles?

I checked Why do Bayesian Networks use acyclicity assumption and read two books on Bayesian probability but I haven't found why DAGs (Direct Acyclic Graphs) are must and what would possible be wrong if we would have cycles.

Also the link on the post I am referring links to the broken math.stackexchange.com page.

Could you provide one example how to break cyclic graphs to DAG and why cyclic graphs won't work?

To me it is just how we interpret the Bayesian network, but yeah, I am lost.

• Your question is somewhat unclear - are you asking why it is DAGs cannot have cycles? Because the linked SE post and the link book chapter in that SE post by Cosima Shalizi explains it fairly well. if it is still unclear, I can try and have a go at explaining? Mar 23 '21 at 18:53
• Yes, why DAG cannot have cycles. I followed thin first link and it is a complete disaster. Won't work. Mar 23 '21 at 20:04
• Where is "SE post by Cosima Shalizi"? Mar 23 '21 at 20:16

At the most basic level, here is what the issue is when you have a DAG with a cycle. Let $$X$$ and $$Y$$ be random variables, that is, nodes in a DAG.

Case 1.

Consider the factorised joint distribution induced by the following DAG:

$$X \rightarrow Y$$

We can immediately write down the joint distribution $$p(X, Y) = p(X)p(Y | X)$$.

Case 2.

Now consider

$$X \leftarrow Y$$

We can immediately write down the joint distribution $$p(X, Y) = p(X | Y) p(Y)$$.

Case 3.

Now consider

$$X \leftrightarrow Y$$

and try specifying the factorisation of the joint distribution $$p(X, Y)$$. Do you now have a better sense of what the issue is?

• really nice explanation, so I cannot write $p(X,Y)=p(X | Y) p(Y) p(Y | X) p(X)$ right? Mar 23 '21 at 20:08
• How would be possible to break this cyclic connection apart. Let's say X is radio, Y is film, and film is speaking about radio, and radio is speaking about film where Jennifer Aniston is Z the main character in the film. Mar 23 '21 at 20:15
• Yes precisely, now you can see at the most basic level what the issue is with DAGs with cycles; I can now edit to address the specific case you are referring to, and what that SE post and linked book chapter by Cosima Shalizi is saying. Mar 23 '21 at 20:17
• We use $p(X,Y)$ to derive the Bayes formula and we get $p(X | Y) p(Y) = p(Y | X) p(X)$ from there just the only case when RVs are independent is $P(X)P(Y)$ but then the cycles doesn't hold. Mar 23 '21 at 20:32
• You already helped me a lot, save your time, unless you like this Jennifer girl. Mar 23 '21 at 20:34