Welcome to the first lesson of our module on causal analysis. In the previous lessons, we explored the power of controlled experiments. By randomly assigning customers to different discount groups, or partners to different communication protocols, we could confidently attribute differences in the outcomes to our interventions. The ANOVA and Tukey's HSD test were the tools that allowed us to quantify these causal effects.
However, running experiments isn't always possible. We can't experimentally assign people to have higher body positivity, nor can we force couples into counseling. Most of the time, we are working with observational data—data collected by observing the world as it is, not by intervening in it. Drawing causal conclusions from such data is fraught with peril. This is where the real challenge—and art—of statistics begins.
This lesson introduces a foundational tool for thinking systematically about cause and effect in observational settings: the Directed Acyclic Graph (DAG). You will learn how to translate your assumptions about a real-world scenario into a formal causal map. Specifically, we will focus on constructing a DAG and identifying its three most important building blocks: mediators, confounders, and colliders. Mastering this will provide the essential grammar for the "do-calculus" and for understanding paradoxes like Simpson's and Berkson's in our upcoming lessons.
From Assumptions to Diagrams
A Directed Acyclic Graph is a visual representation of causal assumptions.
- Nodes: Each variable in your system is a node (e.g., 'Bra Price', 'Relationship Satisfaction').
- Edges (Arrows): A directed arrow from node A to node B () represents the assumption that A is a direct cause of B.
- Acyclic: This means there are no loops. A variable cannot be its own ancestor. For example, you can't have . This reflects the idea that time moves forward and an event cannot be its own cause.
The power of a DAG is that it makes our assumptions explicit and allows us to use graphical rules to determine how to estimate a causal effect. The first step is to learn the basic structures, or "junctions," that form any DAG.
The following article provides an excellent introduction to these concepts. We will refer to it throughout the lesson.
Understanding Junctions (Chains, Forks and Colliders) and the Role ...
This article from Towards Data Science breaks down complex DAGs into their three fundamental building blocks. It serves as a great introduction to the topic.
Please read from the beginning of the article up to the start of the first detour. This will introduce the concept of DAGs, paths, and the three key junction types we will be studying: chains, forks, and colliders.
As the article explained, any path in a DAG is composed of these three structures. Let's examine each one and apply them to our running scenarios. The image below provides a perfect summary of these structures and the core idea of how "paths" are open or closed, which we will now explore in detail.

1. The Fork: Identifying Confounders
A confounder is a variable that is a common cause of both your "treatment" (or exposure) and your "outcome." This creates a non-causal "backdoor" path between them, which can produce a spurious correlation.
Graphically, this is a fork: .
- Variable of interest (Exposure):
- Outcome:
- Confounder:
The path is naturally open. This means that even if does not cause , they will be associated because of their shared cause, . To estimate the true causal effect of on , we must block this backdoor path by conditioning on the confounder . In statistical terms, "conditioning" means controlling for, stratifying by, or including the variable in a regression model.
Application 1: Bra-Fitting Business
Let's analyze the relationship between the type of bra a client chooses () and their reported satisfaction (). A potential confounder is the client's pre-existing level of body positivity ().
- A client with high body positivity might be more willing to invest in a premium, supportive bra (e.g., a sports bra or a professionally fitted one). ()
- A client with high body positivity might also tend to report higher satisfaction with any product related to their body, regardless of its specific features. ()
Our DAG for this confounding structure is:
Bra Choice <- Body Positivity -> Satisfaction
If we just correlate Bra Choice with Satisfaction, we might find that expensive bras are associated with higher satisfaction. However, our DAG tells us that this association might be driven by Body Positivity. To find the true effect of the bra itself, we must control for the client's body positivity level.
Application 2: Relationship Management
Consider a couple in a polyamorous relationship trying a new communication technique () and we want to measure its effect on relationship quality (). A potential confounder could be whether the couple is currently in couples counseling ().
- A couple in counseling is more likely to be introduced to and try new communication techniques. ()
- Couples counseling itself, independent of any specific technique, is aimed at improving relationship quality. ()
The DAG is:
Communication Technique <- Couples Counseling -> Relationship Quality
Without accounting for counseling, we might falsely attribute any improvement in relationship quality to the new technique, when in fact it was the counseling that caused both the adoption of the technique and the improvement. We must condition on whether or not the couple is in counseling.
2. The Chain: Identifying Mediators
A mediator is a variable that lies on the causal pathway between the exposure and the outcome. It explains how the exposure causes the outcome.
Graphically, this is a chain: .
- Exposure:
- Outcome:
- Mediator:
The path from to is naturally open through the mediator . Unlike a confounder, a mediator is not a source of bias. It is a part of the causal story. If we condition on a mediator, we block the very causal path we want to study, which can lead us to incorrectly conclude there is no relationship between and .
Application 1: Bra-Fitting Business
What is the causal effect of wearing a properly sized bra () on reducing back pain ()? A plausible mechanism is that a good bra improves posture ().
- A properly sized bra provides better support, leading to improved posture. ()
- Improved posture reduces strain on the back muscles, leading to less pain. ()
The DAG for this mediation pathway is:
Properly Sized Bra -> Improved Posture -> Reduced Back Pain
Here, Improved Posture is the mediator. If we wanted to estimate the total effect of the bra on back pain, we should not control for posture. If we did control for posture (e.g., only looking at women with "good" posture), we would likely find the bra has no additional effect, because we have blocked the main channel through which it works.
Application 2: Relationship Management
How does a structured check-in protocol () lead to higher relationship satisfaction ()? The mechanism could be an increase in emotional understanding () between partners.
- The protocol creates a dedicated space for partners to share, increasing their understanding of each other's feelings and needs. ()
- Feeling more understood by a partner increases overall relationship satisfaction. ()
The DAG is:
Structured Check-in -> Emotional Understanding -> Relationship Satisfaction
To measure the full impact of the check-in protocol, we would not control for emotional understanding.
3. The Collider: A Source of Strange Bias
A collider is a variable that is a common effect of two other variables. It's where two causal arrows "collide."
Graphically, this is a collider structure: .
- Variable 1:
- Variable 2:
- Collider:
Here's the crucial and counter-intuitive rule: The path between and is naturally blocked by the collider . If and are independent causes of , they are not associated with each other. However, if we condition on the collider , we open the path and create a spurious, non-causal association between and . This is known as collider bias or Berkson's Paradox.
The following resource gives a sharp definition of collider bias and some classic examples.
Collider bias - Catalog of Bias
This article from the Catalogue of Bias at Oxford's CEBM explains collider bias with clear examples and diagrams.
Read the Background and Example sections. Pay close attention to Sackett's "admission rate bias" example—it's a perfect illustration of how selecting a sample based on a common effect (hospitalization) induces bias. Then, read the short section on Preventive steps, which highlights the key takeaway for analysis.
Application 1: Bra-Fitting Business
Imagine we want to study the relationship between fabric quality () and underwire design () in bras. In the general market, these two attributes might be independent. However, let's say we decide to conduct our study only on a sample of bras that have been returned by customers (). A bra might be returned because the fabric is itchy () OR because the underwire is uncomfortable ().
The DAG is:
Fabric Quality -> Customer Return <- Underwire Design
Customer Return is a collider. By sampling only returned bras, we are conditioning on this collider. Now, imagine we pick a returned bra and find its fabric quality is excellent. What can we infer? It's now more likely that the reason for return was the uncomfortable underwire. Conversely, if we know the underwire design was perfect, it's more likely the fabric was the problem. By conditioning on Customer Return, we have created a spurious negative association between Fabric Quality and Underwire Design that does not exist in the general population of bras.
Application 2: Relationship Management
Let's consider two independent traits: a person's desire for high sexual novelty () and their capacity for deep emotional intimacy (). In the general population, let's assume these are unrelated. Now, suppose we decide to study people who are in a specific type of "successful" polyamorous relationship (), where success is defined by having a high level of either sexual novelty or emotional intimacy.
- High desire for novelty can lead one to this type of relationship. ()
- High capacity for intimacy can also lead one to this type of relationship. ()
The DAG is:
Sexual Novelty -> Successful Poly Relationship <- Emotional Intimacy
If we only study people in this "successful" group (conditioning on the collider), we might observe a strange trade-off. Among these individuals, those who are not there for the emotional intimacy must be there for the sexual novelty, and vice versa. This could create a false impression that these two traits are negatively correlated, when in fact they are independent.
Putting It All Together
Real-world scenarios are combinations of these simple structures. Let's look at a slightly more complex DAG that combines these elements for our relationship scenario.

Now, let's build one for our bra-fitting business. Suppose we want to estimate the causal effect of a New Fitting Method () on Customer Loyalty ().
Our assumptions could be:
- The New Fitting Method leads to a Better Fit (Mediation Chain).
- A Better Fit directly increases Customer Loyalty (Mediation Chain).
- The store's Location/Prestige is a common cause of both adopting the New Fitting Method (prestigious stores adopt new tech) and having higher Customer Loyalty (people are loyal to convenient/prestigious stores anyway) (Confounding Fork).
- Both Better Fit and a separate factor, Price Discount, are causes of a customer making a Large Initial Purchase. If we only study customers who made a large purchase, we would be conditioning on a collider and create a spurious link between fit and discounts.
This gives us the following DAG:
Confounder: Location/Prestige
Exposure: New Fitting Method
Mediator: Better Fit
Outcome: Customer Loyalty
Collider: Large Initial Purchase (caused by Better Fit and Price Discount)
Location/Prestige
|
v
New Fitting Method -> Better Fit -> Customer Loyalty
| ^
v |
Large Initial Purchase
^
|
Price Discount
To correctly estimate the causal effect of New Fitting Method on Customer Loyalty, the graphical rules tell us we must:
- Control for the confounder
Location/Prestigeto block the backdoor path. - Do NOT control for the mediator
Better Fit, as that would block the causal pathway of interest. - Do NOT control for the collider
Large Initial Purchase, as that would open a spurious path from our outcome's cause (Better Fit) toPrice Discount, biasing our results.
Conclusion
In this lesson, you have learned to translate real-world scenarios into Directed Acyclic Graphs, a crucial first step in rigorous causal analysis. We have moved from the controlled world of experiments to the messy reality of observational data, where explicit assumptions are paramount.
Key Takeaways:
- DAGs make our causal assumptions explicit through nodes (variables) and directed edges (causal effects).
- All DAGs are built from three basic structures: chains (mediation), forks (confounding), and colliders.
- Confounders create non-causal associations that must be blocked by conditioning on them.
- Mediators are part of the causal pathway and should generally not be conditioned on if you want to estimate the total effect.
- Colliders block associations by default. Conditioning on them is a major source of bias as it creates spurious associations.
You now have the fundamental grammar for reading and building causal maps. In our next lesson, we will put this knowledge into immediate practice. We will numerically demonstrate Simpson's Paradox, showing how failing to condition on a confounder—a mistake you can now easily spot with a DAG—can lead you to reverse a true causal effect.