Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Causality for Analysts

Causality is about understanding what changes what. In analytics, this means moving beyond description and prediction to answer questions such as:

  • Did the price change reduce demand?
  • Did the campaign increase conversions?
  • Did the new onboarding flow improve retention?
  • Did the policy change reduce fraud?

This chapter introduces the core ideas analysts need to reason about causal claims with discipline. The goal is not to turn every analyst into a causal inference specialist. The goal is to help analysts recognize when a causal conclusion is plausible, when it is not, and what kinds of evidence strengthen or weaken the case.


Why Causality Is Hard

Most business data is observational, not experimental. Analysts usually work with data generated by operational systems, user behavior, market forces, and organizational decisions. In that setting, variables move together for many reasons other than direct cause.

Two variables can be associated because:

  • one causes the other
  • the second causes the first
  • both are caused by a third factor
  • the relationship exists only for a subgroup
  • the pattern is accidental or unstable
  • the way the data was collected created the relationship

This is why the phrase correlation is not causation matters. A strong association may still be misleading.

Example: Sales and Ads

Suppose ad spend and sales rise together. That does not automatically mean the ads caused the sales increase. Other possibilities include:

  • demand was already rising due to seasonality
  • marketing spent more because it anticipated higher demand
  • a promotion changed both ad spend and sales
  • only high-performing regions received more budget

The same observed pattern can fit several different causal stories.

Why Analysts Often Get Tricked

Causal reasoning is difficult because real systems are messy:

  • multiple factors act at once
  • causes interact with one another
  • timing matters
  • people and organizations adapt to interventions
  • the “treatment” is rarely assigned randomly
  • some important variables are unmeasured

A predictive model can perform well without identifying causes. For example, searches for umbrellas may predict rain-related product demand, but umbrella searches do not cause the weather.

Practical Rule

When you hear a statement like “X drove Y”, pause and ask:

  1. Compared with what?
  2. How was exposure to X determined?
  3. What else changed at the same time?
  4. What would have happened without X?

Those questions shift the analysis from association to causal evaluation.


Confounding Variables

A confounder is a variable that influences both the supposed cause and the outcome, creating a misleading relationship if it is ignored.

Simple Intuition

If you want to know whether training hours improve employee productivity, manager quality may matter:

  • strong managers encourage more training
  • strong managers also improve productivity directly

If you compare trained and untrained employees without accounting for manager quality, you may overstate the effect of training.

Common Sources of Confounding

In analytics work, confounders often include:

  • seasonality
  • customer mix
  • geography
  • prior behavior
  • income or price sensitivity
  • product quality
  • policy changes
  • team or channel differences
  • macroeconomic conditions
  • time trends

Example: App Feature Adoption

You observe that users who adopt a new feature retain better than users who do not. It is tempting to conclude the feature caused higher retention.

A plausible confounder is user engagement:

  • highly engaged users are more likely to discover and adopt the feature
  • highly engaged users are more likely to stay anyway

Without adjustment, feature adoption may just be a marker for already-valuable users.

Why Confounding Matters

Confounding can:

  • exaggerate a true effect
  • hide a real effect
  • reverse the apparent direction of an effect

This is one reason naive before-and-after comparisons are dangerous.

How Analysts Address Confounding

Common strategies include:

  • randomized assignment
  • matching comparable groups
  • regression adjustment with justified covariates
  • stratification by key variables
  • fixed effects for repeated entities
  • difference-in-differences designs
  • instrumental variable methods in advanced settings

None of these fully rescues a weak design if critical confounders are missing or badly measured.

Analyst Checklist for Confounding

When evaluating a causal claim, ask:

  • What variables affect both treatment and outcome?
  • Were those variables measured before treatment?
  • Are the treatment and control groups comparable?
  • Could omitted variables plausibly explain the result?

Selection Bias

Selection bias occurs when the units observed, included, or exposed are not representative of the target comparison in a way that distorts inference.

Selection bias is closely related to confounding, but it emphasizes how cases enter the data or treatment group.

Example: Loyalty Program Analysis

Suppose loyalty members spend more than non-members. That does not prove the program increases spending. People who join loyalty programs may already be more frequent or higher-value customers.

The comparison is biased because participation is self-selected.

Common Forms of Selection Bias

Self-selection

People choose whether to participate.

Examples:

  • opting into a product feature
  • enrolling in a program
  • responding to a survey

Survivorship bias

You only observe those who remain.

Examples:

  • analyzing only active users
  • evaluating funds that still exist
  • studying only completed transactions

Attrition bias

People drop out unevenly across groups.

Examples:

  • users in one treatment group churn before outcomes are measured
  • only satisfied customers complete follow-up surveys

Filtering or eligibility bias

Only certain units are exposed.

Examples:

  • only premium customers see an offer
  • only high-risk cases receive manual review
  • only stores above a threshold get the intervention

Example: Support Intervention

A company adds proactive support outreach for accounts flagged as at risk. Later, those accounts still churn more than others. It would be wrong to conclude the outreach causes churn. The program targeted already-risky accounts.

The treatment group was selected because of expected bad outcomes.

Practical Warning

Whenever treatment is based on:

  • prior performance
  • risk score
  • manager choice
  • user choice
  • eligibility rules
  • operational constraints

selection bias is a serious concern.

Red Flags

Be especially cautious when someone says:

  • “Users who used the feature did better”
  • “Customers who got outreach spent more”
  • “Stores where we deployed the tool improved”
  • “Survey respondents were more satisfied”

The key question is whether those groups were different before the intervention.


Counterfactual Reasoning

Causal inference is fundamentally about counterfactuals: what would have happened to the same unit, at the same time, under a different condition?

This is the core challenge. For any person, store, customer, or region, we only observe one realized outcome:

  • what happened with the treatment or
  • what happened without it

We never observe both at once for the same unit in the same moment.

The Fundamental Problem

If a customer received a discount and purchased, the causal question is not whether they purchased. It is whether they would have purchased without the discount.

That unobserved alternative is the counterfactual.

Why This Matters

Most causal methods are attempts to build a credible substitute for the missing counterfactual.

Examples:

  • randomized control group
  • matched untreated users
  • prior trend used as baseline
  • similar regions unaffected by the intervention

Average Treatment Effect

Because individual counterfactuals are unobservable, analysts often estimate group-level effects such as:

  • Average Treatment Effect (ATE): average effect across the full population
  • Average Treatment Effect on the Treated (ATT): average effect for those who actually received treatment

These quantities answer different business questions. A campaign may help exposed users on average while having little benefit for the entire customer base.

Example: Email Campaign

Suppose conversion is 8% among emailed users and 5% among non-emailed users.

That 3-point gap is not automatically the treatment effect. The true causal effect depends on whether the non-emailed users represent a valid stand-in for what the emailed users would have done without the email.

Strong Causal Thinking

A good analyst does not start with “What does the treated group look like?” A good analyst starts with “What is the most credible estimate of the missing counterfactual?”


Randomized Experiments

A randomized experiment is the most reliable general-purpose method for estimating causal effects. Random assignment makes treatment status independent of confounders on average, especially at adequate sample sizes.

This is why A/B tests are so valuable.

Core Logic

If users are randomly assigned to treatment and control, then before the intervention the groups should be similar in expectation on both:

  • observed characteristics
  • unobserved characteristics

Any later systematic outcome difference can therefore be attributed more credibly to the treatment.

Basic Structure

A randomized experiment includes:

  • a clearly defined treatment
  • a control condition
  • a target population
  • an outcome metric
  • random assignment
  • a pre-specified analysis plan

Example: Checkout Redesign

You randomly assign users to:

  • old checkout flow
  • new checkout flow

If conversion is higher in the new-flow group, and the experiment is properly run, the design provides a strong basis for causal interpretation.

What Randomization Solves

Randomization greatly reduces:

  • confounding
  • selection bias
  • omitted variable bias

It does not automatically solve:

  • bad outcome measurement
  • implementation failures
  • spillover effects
  • noncompliance
  • underpowered tests
  • multiple testing problems
  • lack of external validity

Common Experiment Pitfalls

Sample ratio mismatch

The assigned proportions differ meaningfully from what was intended. This can indicate instrumentation or allocation problems.

Interference or spillovers

One unit’s treatment affects another unit’s outcome.

Examples:

  • social network effects
  • marketplace interactions
  • inventory competition across regions

Noncompliance

Units assigned to treatment do not actually receive it, or controls get partial exposure.

Peeking and early stopping

Repeatedly checking results and stopping when significance appears inflates false positives.

Metric instability

Short-term gains may not reflect long-term value.

Internal vs External Validity

A clean experiment can have high internal validity but still limited external validity.

  • Internal validity: did the treatment cause the observed effect in this test?
  • External validity: will the effect generalize to other users, regions, times, or conditions?

Analysts should separate those questions rather than assume both.

When Experiments Are Best

Randomized experiments are best when:

  • treatment can be assigned
  • the organization can tolerate experimentation
  • outcomes can be measured reliably
  • ethical and operational constraints permit testing

Quasi-Experiments

Often analysts cannot run randomized experiments. In those cases, quasi-experimental methods aim to recover causal insight from non-randomized settings by exploiting structure in the data or decision process.

These methods are valuable, but they depend on assumptions that must be argued and checked.

Difference-in-Differences

This approach compares outcome changes over time between:

  • a treated group
  • a comparison group

The key idea is to subtract out baseline differences and common trends.

Example

A policy launches in one region but not another. If both regions had similar pre-policy trends, the difference in post-policy changes may estimate the policy effect.

Key Assumption

The major assumption is parallel trends: absent treatment, the treated and comparison groups would have followed similar trends.

This assumption is not guaranteed. It must be justified with context and pre-treatment evidence.


Regression Discontinuity Design

This method uses a cutoff rule for treatment assignment.

Example

Customers with risk scores above 700 receive manual review; those below do not. Cases just above and just below the threshold may be similar except for treatment.

Comparing outcomes near the cutoff can identify a local causal effect.

Key Assumption

Units cannot precisely manipulate their position around the threshold in a way that invalidates comparability.


Instrumental Variables

An instrument is a variable that affects treatment exposure but influences the outcome only through that treatment.

Example

Distance to a service center may affect whether a customer uses a service, but not the outcome directly, under certain assumptions.

This method is powerful but demanding. The assumptions are strong and often controversial.


Interrupted Time Series

This design examines whether an outcome series changes sharply after an intervention.

Example

A fraud detection rule goes live on a known date. Analysts test whether fraud rates changed abruptly beyond expected trend and seasonality.

Risks

This design is vulnerable when other changes happened around the same time.


Matching and Statistical Adjustment

Analysts often compare treated and untreated units that look similar on observed covariates.

Methods include:

  • exact matching
  • propensity score methods
  • regression adjustment
  • weighting schemes

These can improve comparability on measured variables, but they do not protect against unmeasured confounding.

Key Principle for Quasi-Experiments

Quasi-experiments do not produce causal credibility through mathematics alone. Their strength comes from a believable identification strategy grounded in domain knowledge, process understanding, and assumption checking.


Causal Diagrams

Causal diagrams, often called Directed Acyclic Graphs (DAGs), are visual tools for representing assumptions about how variables influence one another.

They do not prove causality. They clarify the causal story you are assuming.

Why Analysts Should Use Them

Causal diagrams help analysts:

  • identify confounders
  • distinguish mediators from confounders
  • avoid controlling for the wrong variables
  • communicate assumptions explicitly
  • reason about bias pathways

Basic Elements

A DAG uses:

  • nodes for variables
  • arrows for direct causal influence

For example:

Seasonality ──> Ad Spend ──> Sales
Seasonality ─────────────> Sales

This diagram says seasonality affects both ad spend and sales, making it a confounder.

Confounder vs Mediator

A confounder affects both treatment and outcome before treatment.

A mediator lies on the causal pathway from treatment to outcome.

Example:

Discount ──> Purchase Intent ──> Conversion

If you want the total effect of discount on conversion, adjusting for purchase intent may block part of the effect you are trying to estimate.

Collider Bias

A collider is a variable influenced by two other variables.

Example:

Ad Exposure ──> Website Visit <── Purchase Intent

If you condition only on website visitors, you may create a spurious relationship between ad exposure and purchase intent, even if none existed before.

This is one of the most common conceptual mistakes in analyst workflows.

Practical Use of DAGs

Before modeling a causal claim, sketch a simple diagram and ask:

  • What is the treatment?
  • What is the outcome?
  • What variables cause both?
  • What happens after treatment and should not be adjusted away?
  • Am I conditioning on a selected subgroup that creates bias?

Even a rough diagram is often better than an implicit, unexamined model.


When Causal Claims Are Justified

Analysts should not make causal claims casually. A causal claim is justified only when the evidence and design support the statement.

Stronger Justification

Causal claims are more credible when:

  • treatment assignment was randomized
  • the comparison group is clearly valid
  • timing aligns with the proposed mechanism
  • important confounders were addressed
  • identification assumptions are explicit and plausible
  • robustness checks support the result
  • outcome measures are reliable
  • alternative explanations were seriously considered

Weaker Justification

Causal claims are weak when based only on:

  • cross-sectional correlations
  • naive before-and-after comparisons
  • subgroup patterns without design logic
  • predictive feature importance
  • uncontrolled observational comparisons
  • hand-wavy business intuition

Language Matters

Analysts should calibrate wording to evidence quality.

Appropriate stronger language

Use when design supports it:

  • “The experiment indicates the new flow increased conversion by approximately 2.1 percentage points.”
  • “The policy change appears to have reduced processing time, based on a difference-in-differences design with stable pre-trends.”

Appropriate cautious language

Use when evidence is suggestive but not definitive:

  • “The results are consistent with a positive effect, but confounding cannot be ruled out.”
  • “Feature adoption is associated with higher retention, though more engaged users may be more likely to adopt.”
  • “This pattern suggests a possible causal relationship, but the design is observational.”

Inappropriate overclaiming

Avoid statements like:

  • “This proves the feature caused retention.”
  • “The campaign definitely drove the increase.”
  • “Because the coefficient is significant, the effect is causal.”

A Useful Standard

A causal claim is justified when you can answer all of the following with reasonable confidence:

  1. What is the intervention or treatment?
  2. What is the counterfactual?
  3. Why is the comparison valid?
  4. What assumptions are required?
  5. How could the conclusion be wrong?

If those questions do not have credible answers, causal language should be softened.


Common Analyst Mistakes in Causal Work

Mistaking prediction for explanation

A model that predicts churn well does not necessarily identify what will reduce churn.

Controlling for everything available

Adding more variables is not always better. Controlling for mediators or colliders can introduce bias.

Ignoring treatment assignment logic

How units got treated is often more important than the regression output.

Using post-treatment variables as controls

Variables affected by treatment can distort effect estimates.

Relying on significance alone

A statistically significant coefficient is not evidence of causality without a valid design.

Ignoring timing

Causes must precede effects, and timing should fit a plausible mechanism.

Overlooking heterogeneity

A treatment may help some groups and harm others. Average effects can mask meaningful variation.


Practical Workflow for Analysts

When asked a causal question, use this sequence.

1. Define the causal question precisely

Replace vague wording like “impact” with a sharper formulation:

  • treatment
  • outcome
  • unit of analysis
  • time horizon
  • target population

Example:

What was the effect of the free shipping offer on average order value for first-time customers during the March campaign?

2. Identify the assignment mechanism

Ask how treatment happened:

  • randomized?
  • policy rule?
  • self-selection?
  • manager choice?
  • eligibility threshold?

This often determines the method.

3. Draw a simple causal diagram

Map likely causes of both treatment and outcome. Distinguish:

  • confounders
  • mediators
  • colliders
  • post-treatment variables

4. Define the counterfactual comparison

State what untreated outcome stands in for the missing counterfactual.

5. Choose a design

Possible choices:

  • randomized experiment
  • difference-in-differences
  • regression discontinuity
  • interrupted time series
  • matching and adjustment
  • descriptive only, if causal inference is not credible

6. Check assumptions

Write them down explicitly. Do not leave them implicit.

7. Perform robustness checks

Examples:

  • pre-trend inspection
  • placebo tests
  • subgroup stability
  • sensitivity to covariates
  • alternative specifications
  • outcome definition checks

8. Communicate carefully

State:

  • estimate
  • uncertainty
  • assumptions
  • limitations
  • level of causal confidence

Example: Framing a Causal Analysis

Suppose leadership asks:

Did the new recommendation engine increase revenue?

A disciplined analyst might respond by structuring the work like this:

Treatment

Exposure to the new recommendation engine.

Outcome

Revenue per session, conversion rate, or average order value.

Key Risks

  • rollout targeted to higher-value users
  • seasonality during launch period
  • concurrent pricing or merchandising changes
  • user engagement confounding

Best Design Options

  • randomized A/B test if feasible
  • phased rollout with strong comparison groups
  • difference-in-differences if rollout timing varies by market and pre-trends are comparable

Appropriate Conclusion Styles

  • Strong: if randomized and clean
  • Moderate: if quasi-experimental assumptions hold reasonably well
  • Weak: if only observational association is available

That framing alone is a major improvement over simply comparing exposed versus unexposed users.


Key Takeaways

  • Causality asks what would happen under different conditions, not just what variables move together.
  • Confounding variables can create misleading relationships by affecting both treatment and outcome.
  • Selection bias arises when exposure or inclusion is non-random in a way tied to outcomes.
  • Counterfactual reasoning is central because the untreated outcome for a treated unit is unobserved.
  • Randomized experiments are the strongest general design for causal inference.
  • Quasi-experiments can provide credible evidence when experiments are impossible, but only under explicit assumptions.
  • Causal diagrams help analysts reason clearly about what to control for and what to avoid conditioning on.
  • Causal claims should be proportional to the design quality and evidence strength.

Analyst’s Causal Claim Checklist

Before making a causal statement, verify:

  • the treatment is clearly defined
  • the outcome is clearly defined
  • the timing supports causation
  • the comparison group is credible
  • major confounders were addressed
  • selection into treatment is understood
  • assumptions are explicit
  • robustness checks were performed
  • wording matches the actual strength of evidence

Summary

Causal analysis is harder than descriptive or predictive analysis because the key comparison is always partly unobserved: what would have happened otherwise. Good analysts do not leap from pattern to cause. They examine treatment assignment, confounding, selection bias, and counterfactual logic before making claims.

The strongest causal evidence usually comes from randomized experiments. When experiments are not available, quasi-experimental methods and causal diagrams can help structure more credible analyses. But no method removes the need for judgment. Causal claims are justified only when the design, assumptions, and evidence support them.

In practice, disciplined causal reasoning is often less about finding a perfect answer and more about avoiding false certainty.