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







