A directed acyclic graph (DAG) is a picture of causal assumptions. Each node is a variable; each arrow means “this may cause that.” Drag from one node to another to draw an arrow.

Exercise 1: Smoking and cancer

Drag from one node to the other to show which variable you think causes the other.

Exercise 2: Add inflammation

Draw arrows among all three nodes. Try a mediator chain (Smoking → Inflammation → Cancer), then clear and try pointing both Smoking and Cancer into Inflammation, or both arrows out of Inflammation.

Takeaway: The same variables can be arranged into different causal stories. A mediator lies on the pathway; a confounder affects both exposure and outcome; a collider is where two arrows meet.