DataCareerHub
Explore learning
← Advanced causal inferenceFree companion · 50 minute suggested activity

Elm 1: define the causal question and inspect confounding

Advanced causal reasoning · Distinguish an observed association from an intervention effect before adjusting a table.

Learn → Try → ExplainReviewed 2026-11-01
01

Start with an estimand

Original fictional learning-reminder scenario. Specify eligible population, well-defined intervention and comparison, assignment or exposure time, follow-up, outcome and effect scale. Average treatment effect compares mean potential outcomes under two interventions in that population; ATT concerns those treated. These are targets, not quantities automatically identified by observed group differences. Prerequisites: group means and probability basics.

02

The missing comparison

For a given unit and follow-up, you observe its outcome under the treatment it received, not both potential outcomes. Identification needs assumptions connecting observed data to the missing counterfactual. A predictive model or a strong association alone does not provide that bridge. No real experiment or intervention is conducted in this activity.

03

A stratified fictional table

X is a PRE-treatment difficulty group. Compute overall success rates and within-X differences, then an equal-weight standardised contrast. Counts are deliberately constructed, not empirical proof of an effect.

X    | exposed successes / n | unexposed successes / n
low  | 80 / 100             | 18 / 20
high |  2 / 20              | 20 / 100
04

Your attempt

Why can the overall exposed rate look higher even when both within-group differences go the other way? Would collecting X guarantee no confounding? State consistency, conditional exchangeability and positivity in your own words. Which further knowledge would justify X as an adjustment variable?

Worked solution

Overall rates are 82/120 and 38/120, difference 44/120≈0.3667. Within low group:0.80−0.90=−0.10; within high:0.10−0.20=−0.10. Equal weighting yields−0.10. Different group composition reverses the descriptive contrast. Standardisation here is arithmetic; a causal interpretation still requires the relevant identification assumptions, including no unmeasured confounding conditional on an adequate pre-treatment set.

06

Sketch assumptions before selecting variables

A causal diagram can express assumed arrows X→A, X→Y and A→Y. It does not prove those assumptions. A post-treatment mediator M on A→M→Y is not interchangeable with a pre-treatment confounder when targeting a total effect. Conditioning on a selection collider A→S←Y can introduce association. These simple diagrams are reasoning examples; do not adjust for every available column without an estimand and graph.

07

Positivity and measurement exercise

Imagine no high-difficulty unit was unexposed. The high-group comparison is unsupported by that observed table. A model may extrapolate but cannot create observed overlap. Discuss measurement error, unmeasured baseline motivation, different follow-up and attrition as additional threats. Do not call covariate balance proof that all confounding is removed.

08

Review and explain

Score 0–2 for estimand clarity, rate calculation, composition explanation, identification assumptions and adjustment-variable reasoning. Explain why the equal-weight contrast targets a stated mix rather than every possible target population. Self-review is unsaved and does not award a credential.

09

Authoritative reference

Read the official reference ↗

Miguel A Hernán and James M Robins, Causal Inference: What If. Read the public authors’ resource for definitions and assumptions. All Elm data/explanations are original; no book text or exercises are republished. Next: Elm 2.

Make the reasoning yours.

Try the activity before reading its reference. Keep your sources, commands and assumptions with your work. Companion activities are unsaved self-practice and do not award a certificate or change lesson progress.

Resume guidance and examples are for learning and preparation only. They do not guarantee interviews, a job offer or employment.

These original companion activities are free. Advanced offline packs are separate supporter extras; companion activities do not change saved course progress.

Learner dashboard ↗ · Ask a question ↗