Causal Inference in Python 9781098140250

How many buyers will an additional dollar of online marketing bring in? Which customers will only buy when given a disco

642 153 6MB

English Year 2022

Report DMCA / Copyright

DOWNLOAD FILE

Causal Inference in Python
 9781098140250

Table of contents :
Preface
Prerequisites
Outline
1. Introduction To Causal Inference
What is Causal Inference
Why we Do Causal Inference
Machine Learning and Causal Inference
Association and Causation
The Treatment and the Outcome
The Fundamental Problem of Causal Inference
Causal Models
Interventions
Individual Treatment Effect
Potential Outcomes
Consistency and No Interference Assumptions
Causal Quantities of Interest
Causal Quantities: An Example
Bias
The Bias Equation
A Visual Guide to Bias
Identifying the Treatment Effect
The Independence Assumption
Identification with Randomization
Chapter Key Ideas
Other Examples
2. Randomized Experiments and Stats Review
Brute Force Independence with Randomization
An A/B Testing Example
Checking for Balance
The Ideal Experiment
The Most Dangerous Equation
The Standard Error of Our Estimates
Confidence Intervals
Hypothesis Testing
Null Hypothesis
Test Statistic
P-values
Power
Sample Size Calculation
Key Ideas
Other Examples
3. Graphical Causal Models
Thinking About Causality
Visualizing Causal Relationships
Are Consultants Worth it?
Crash Course in Graphical Models
Chains
Forks
Immorality or Collider
The Flow of Association Cheat Sheet
Querying a Graph in Python
Identification Revisited
CIA and The Adjustment Formula
Positivity Assumption
An Identification Example with Data
Confounding Bias
Randomization Revisited
Selection Bias
Conditioning on a Collider
Conditioning on a Mediator
Key Ideas
Other Examples
4. The Unreasonable Effectiveness of Linear Regression
All You Need is Linear Regression
Why We Need Models
Regression in A/B Tests
Adjusting with Regression
Regression Theory
Single Variable Linear Regression
Multivariate Linear Regression
Frisch-Waugh-Lovell Theorem and Orthogonalization
Debiasing Step
Denoising Step
Standard Error of the Regression Estimator
Final Outcome Model
FWL Summary
Regression as an Outcome Model
Positivity and Extrapolation
Non-Linearities in Linear Regression
Linearizing the Treatment
Non-Linear FWL and Debiasing
Regression for Dummies
Conditionally Random Experiments
Dummy Variables
Saturated Regression Model
Regression as Variance Weighted Average
De-Meaning and Fixed Effects
Omitted Variable Bias: Confounding Through the Lens of Regression
Neutral Controls
Noise Inducing Control
Feature Selection: A Bias-Variance Trade-Off
Key Ideas
Other Examples
5. Propensity Score
The Impact of Management Training
Adjusting with Regression
Propensity Score
Propensity Score Estimation
Propensity Score and Orthogonalization
Inverse Propensity Weighting
Variance of IPW
Stabilized Propensity Weights
Pseudo-Populations
Selection Bias
Bias-Variance Trade-Off
Positivity
Doubly Robust Estimation
Treatment is Easy to Model
Outcome is Easy to Model
Generalized Propensity Score for Continuous Treatment
Keys Ideas
Other Examples
About the Author

Polecaj historie