# Eight basic rules for causal inference | Peder M. Isager

## ๐ Abstract

The article discusses seven basic rules that govern the relationship between causal mechanisms in the real world and associations/correlations observed in data. It covers four fundamental causal structures (complete independence, chain, fork, and collider) and explains how these structures relate to the rules of causal influence, confounding, random manipulation, and controlling for confounders and colliders. The article also discusses important assumptions that need to be met for these rules to hold.

## ๐ Q&A

### [01] Introduction

**1. What are the seven basic rules described in the article?**
The article describes seven basic rules that govern the relationship between causal mechanisms and observed associations/correlations:

- Causal influence creates correlation
- Confounding creates correlation
- Random manipulation protects a variable from causal influence
- Controlling for a confounder blocks correlation arising from that confounder
- Controlling for a collider leads to correlation
- Controlling for a causal descendant (partially) controls for the ancestor
- Important assumptions that need to be met for these rules to hold (no spurious correlation, consistency, exchangeability, positivity, faithfulness)

**2. What are the four fundamental causal structures described in the article?**
The four fundamental causal structures are:

- Complete independence: No path can be traced between A and B.
- Chain: A directed path can be traced from A to B, with all arrows pointing from A to B.
- Fork: An undirected path can be traced from A to B through a common causal ancestor C.
- Collider: An undirected path can be traced from A to B through a causal descendant D.

**3. How do these causal structures relate to the rules described in the article?**
The article states that all the rules it describes deal with one or more of these four fundamental causal structures. Understanding which causal structure is present in a given situation helps determine which causal inference rules are relevant.

### [02] Rule 2: Causal Influence Creates Correlation

**1. What is the relationship between causal influence and correlation according to this rule?**
If A is a cause of B, or B is a cause of A, then A and B will be correlated in the data. This also applies if A causes an intermediate variable M, which in turn causes B (mediation).

**2. How is this demonstrated in the simulation code?**
The simulation code shows that when B is a function of A, or when B is a function of an intermediate variable M that is itself a function of A, there is a positive correlation observed between A and B.

### [03] Rule 3: Confounding Creates Correlation

**1. What is the relationship between confounding and correlation according to this rule?**
If A and B share a common ancestor C (causal fork), A and B will be correlated in the data. This phenomenon is called confounding or the "third variable problem".

**2. How is this demonstrated in the simulation code?**
The simulation code shows that when A and B are both functions of a common variable C, a positive correlation is observed between A and B, even though there is no direct causal relationship between them.

### [04] Rule 5: Controlling for a Confounder Blocks Correlation

**1. What is the effect of controlling for a confounder variable according to this rule?**
If A and B share a common ancestor C (causal fork), the confounding correlation between A and B created by C (as per rule 3) is removed if C is controlled for.

**2. How is this demonstrated in the simulation code?**
The simulation code shows that when the common cause C is controlled for, the correlation between A and B is eliminated, demonstrating that controlling for the confounder blocks the confounding correlation.

### [05] Rule 7: Controlling for a Collider Leads to Correlation

**1. What is the effect of controlling for a collider variable according to this rule?**
If A and B share a causal descendant (collider) D, and D is controlled for, A and B will become correlated in the data. This is often referred to as "conditioning on a collider" or collider bias.

**2. How is this demonstrated in the simulation code?**
The simulation code shows that when the collider variable D (which is a function of both A and B) is controlled for, a negative correlation is introduced between A and B, even though there was no initial correlation between them.

### [06] Rule 8: Controlling for a Causal Descendant Partially Controls for the Ancestor

**1. What is the effect of controlling for a causal descendant according to this rule?**
If B is a descendant of A and B is controlled for, A is also (partially) controlled for. The degree to which A is controlled when B is controlled for generally depends on how reliably A causes B.

**2. How is this demonstrated in the simulation code?**
The simulation code shows that when controlling for CM (a semi-reliable measure of the confounder C), some of the confounding correlation between A and B is removed, but not as much as when directly controlling for C.