liveBook · Manning

Causation

As explained in Effective Data Analysis

Causation is a relationship in which one event, condition, or behavior produces a change in another.

Causation is a relationship in which one event, condition, or behavior produces a change in another. Analytics work must distinguish causal claims from associations, predictions, and correlations. section 2.2 section 4.3.3

A correlation can be useful without establishing cause and effect. Before recommending action, ask whether the suspected independent variable can be manipulated, whether the measured outcome represents the intended target, and what the analysis can reasonably conclude. section 3.2.2

Use these checks when evaluating or communicating a possible causal relationship:

  • Separate correlational findings from evidence that changing one variable will change another. section 3.2.2
  • Clarify whether the observed measure captures the intended outcome, such as population size rather than visibility. section 3.2.2
  • State limitations consistently so stakeholders do not convert predictive or correlational results into proof. section 2.2 section 4.3.3
  • Use focused visualizations and explicit guidance to support accurate interpretation. section 4.3.3

Temperature and rat sightings

Warmer temperatures may correlate with more reported rat sightings, but that relationship does not establish that warmer weather causes a larger rat population. Evaluation should distinguish population from visibility and consider whether temperature can be manipulated to change the outcome. section 3.2.2

weather = pd.read_csv("weather.csv", index_col=0)  #1
weather = weather.reset_index()
weather["day"] = pd.to_datetime(weather["day"], format="%m/%d/%y")

rats_weather = pd.merge(
    weather, rats, how="left", on="day"
).fillna(0)  #2

corrs = rats_weather.corr()   #3
corrs.style.background_gradient(cmap="RdBu", vmin=-1)

A pandas workflow merges weather and rat-sighting data, calculates correlations, and supports inspection of an association without establishing causation. section 3.2.2

How Effective Data Analysis covers it

How deep it goes
Distinguishes causation from correlation and prediction, then stops short of presenting a complete causal identification method.
Examples
Uses rat sightings, temperature, weather data, correlation matrices, scatterplots, and stakeholder interpretation guides.
What it assumes
Assumes familiarity with basic analytics and variables while reinforcing the distinction between association, prediction, and cause and effect.
What you can do after
Evaluate causal claims, diagnose stakeholder misinterpretations, and communicate correlational or predictive findings with appropriate limitations.
How it connects
Connects causation with correlation, regression, independent variables, dependent variables, predictive relationships, and experimental design.

Also explained in

Compare how 8 books explain causation →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Effective Data Analysis. The section links point to the parts of the book it draws on.