Directed Acyclic Graphs
A Directed Acyclic Graph (DAG) consists of nodes and arcs, which the literature also calls vertices and edges. Nodes represent variables or events. Each arc points from one node to another, and no path that follows the arcs in their direction returns to its starting node. A DAG encodes conditional independence relationships among variables. For a DAG in general, an arc represents merely an association and does not imply a causal direction.
Causal Directed Acyclic Graph (CDAG)
In a causal DAG, however, an arc does encode the causal direction asserted by a researcher or domain expert: an arc from node to node means we assume that can influence , that is, can have an effect on . The arc says nothing about whether this effect is strong or weak, positive or negative, deterministic or probabilistic. What it does state unambiguously is the direction. For example, “Fire causes Smoke” is encoded as , which asserts that can cause and that cannot cause .
Structures in a CDAG
Any CDAG, regardless of size and complexity, can be decomposed into three basic structures. Each structure implies a specific pattern of associations expected in data collected from the underlying domain.
In the following three diagrams, and are the endpoints of a path and is the middle node. Marginally means without conditioning on . Conditionally on means we compare observations at the same value of . The symbol means “is independent of.”
Chain
In this chain, can affect indirectly through .
- A directed arc represents a potential direct causal effect. In this graph, means we assume that can directly affect .
- A missing arc represents a causal assumption. In this graph, we assume that has no direct effect on . Its effect on is mediated by .
Implication for Causality
has a potential causal effect on mediated by .
Implication for Association
Marginally (or unconditionally), and are dependent. This means that without knowing the exact value of , learning about informs us about and vice versa, i.e., the path between the nodes is unblocked, and information can flow in both directions.
Given , and are conditionally independent. In BayesiaLab, we represent an observation of by setting Hard Evidence on that node. In other words, by “hard”-conditioning on , we block the path from to and from to . Thus, and are conditionally independent, given :
Hard Evidence means that there is no uncertainty regarding the value of the observation or evidence. If uncertainty remains regarding the value of , the path will not be entirely blocked, and an association will remain between and .
Example: Can you predict a marathon runner’s ranking from their training?
Suppose we record how many days each runner trained before a marathon and compare those records with the race results. We would expect runners who trained more to finish faster and place higher. Runners who trained very little might finish near the back of the field or might not finish at all.
Now look at the runners who finished. Once we know each runner’s finishing time, we can put them in order. Knowing how many days they trained tells us nothing further about their ranking. Observing blocks the flow of information from to .
Common Cause
The second configuration has as the common parent of and .
Implication for Causality
is the common cause of both and .
Implication for Association
A common cause and a chain imply the same pattern of conditional independence. Thus, and are marginally dependent but conditionally independent given (by setting Hard Evidence on ):
Example: Can you predict hair length from height?
Imagine we measure and in a sample of adults from around the world. Suppose we find that the taller a person is, the shorter their hair tends to be. Why should someone’s height tell us anything about their hair?
Now consider . In our sample, men are taller on average and typically wear their hair shorter. Women are shorter on average and typically wear their hair longer. These two differences can produce the association we see when we pool the observations.
What happens if we compare men with men and women with women? In this model, knowing a person’s height then tells us nothing further about their hair length. In other words, and are conditionally independent given .
Common Effect
The final structure has a common child , with and being its parents. This structure is called a “V-Structure.” In this configuration, the common child is also known as a “collider.”
Implication for Causality
and are the direct causes of .
Implication for Association1
Marginally (or unconditionally), and are independent, i.e., there is no information flow between and . When we observe the common effect , its two causes and become dependent. If we condition on the collider , information can flow between and , i.e., conditioning on opens the information flow between and :
Even introducing a minor change in the distribution of , e.g., from no observation (“color unknown”) to a very vague observation (“it could be anything, but it is probably not purple”), opens the information flow.
For purposes of formal reasoning, this type of connection is of special significance. Conditioning on facilitates inter-causal reasoning, often referred to as the ability to “explain away” the other cause, given that the common effect is observed (see Inter-Causal Reasoning in Chapter 4).
Example: Did it rain last night?
You look out the window in the morning and see that the lawn is wet. That makes you think it may have rained overnight. Then you check the sprinkler log and discover that the sprinkler ran. How does that change the probability that it rained?
Suppose the sprinkler runs on a timer, independently of the weather. Before you saw the lawn, learning that the sprinkler ran would have told you nothing about rain. Once you know the lawn is wet, the same information matters. Either rain or the sprinkler could have soaked the grass. Learning that the sprinkler ran makes rain less probable than it seemed when all you knew was that the lawn was wet.
This type of reasoning is often referred to as explaining away. In Chapter 4, we explore it more formally under the heading Inter-Causal Reasoning.
Application to Complex CDAGs
As we assemble more nodes and arcs into a larger graph, we can represent our assumptions about an entire domain. And, from this systematic encoding of individual causal assumptions, we can extract more understanding than what we entered through our assumptions. A DAG therefore encodes more than its arcs state explicitly: for any pair of nodes, the graph alone determines whether they are marginally or conditionally dependent or independent.
CDAG Example: University Admissions
In preparation for their university application, students take an initial math test that produces a score helping them understand their math proficiency. Knowing their , students can elect to participate in sessions. We assume that the influences the decision to sign up for . Later, the students take a final math test, which is presumably influenced by their initial proficiency and any they may have taken. The is then taken into account for the decision. In other words, the influences .
The following graph shows this example encoded as a CDAG.
In this context, one interesting research question might be the effect of on the probability of . Later, we will obtain a data set that includes observations for all the variables in this domain. However, it is not the data that determines whether it is possible to estimate the effect of on or any other effect in this domain. Instead, we will need to perform Causal Identification in the next step.
The four panels below highlight examples of all three structures in the admissions CDAG. The first two show chains, the third shows a common cause, and the fourth shows a common effect.
Via
Via
A node’s role depends on the path we trace. is a common effect of and . On the path from to , that same node is the mediator in the chain.
Footnotes
-
Observing a consequence of a common effect can also open the path through it. In the admissions example, is a common effect of and . Observing , which is influenced by , can open that path as well. ↩