Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Matheus Facure

How many buyers will an additional dollar of online marketing bring in? Which customers will only buy when given a discount coupon? How do you establish an optimal pricing strategy? The best way to determine how the levers at our disposal affect the business metrics we want to drive is through causal inference. In this book, author Matheus Facure, senior data scientist at Nubank, explains the largely untapped potential of causal inference for estimating impacts and effects. Managers, data scientists, and business analysts will learn classical causal inference methods like randomized control trials (A/B tests), linear regression, propensity score, synthetic controls, and difference-in-differences. Each method is accompanied by an application in the industry to serve as a grounding example. With this book, you will • Learn how to use basic concepts of causal inference • Frame a business problem as a causal inference problem • Understand how bias gets in the way of causal inference • Learn how causal effects can differ from person to person • Use repeated observations of the same customers across time to adjust for biases • Understand how causal effects differ across geographic locations • Examine noncompliance bias and effect dilution

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A practical, example-driven guide to estimating cause and effect in business settings, written for data scientists, analysts, and managers who already know some Python and statistics but need to turn messy observational data into defensible decisions. If you have ever asked "did this campaign actually work?" and distrusted the naive answer, this book is for you. 【Book Arc】 - **Opening (~0%–10%)**: Frames business problems as causal questions — marketing spend, credit limits, pricing — and introduces the core tension: association is not causation. Establishes the fundamental problem of causal inference and why naive comparisons mislead. - **Early (~10%–35%)**: Builds the statistical and conceptual foundation. Covers randomized experiments (A/B tests), potential outcomes, the ATE/ATT decomposition, bias, exchangeability, standard errors, confidence intervals, hypothesis testing, p-values, and power. Uses a cross-sell email experiment as a running example. - **Middle (~35%–55%)**: Moves into graphical causal models — chains, forks, and confounders — and shows how to reason about causal structure visually. Includes practical examples like online vs. face-to-face learning and the fork structure behind tech recruiting signals. - **Late (~55%–85%)**: Extends beyond simple randomization to observational methods: linear regression as a causal tool, propensity score methods, and difference-in-differences. Addresses repeated observations of the same customers across time to adjust for bias. - **Ending (~85%–100%)**: Covers synthetic controls, geographic variation in treatment effects, noncompliance bias, and effect dilution. Closes with guidance on framing and communicating causal findings in industry contexts. 【Key Takeaways】 - **Association equals treatment effect plus bias** (Early): The book's central equation decomposes naive comparisons into the causal effect on the treated plus a bias term. Understanding this decomposition is the foundation for every method that follows. - **Randomization is the gold standard, but often impossible** (Early): A/B tests solve exchangeability by making treated and control groups comparable on average. When randomization is unethical, too costly, or impractical — as with credit limits — you need observational methods. - **Graphical models clarify confounding** (Middle): Chains, forks, and colliders determine whether association flows between variables. A fork (common cause) creates confounding; conditioning on the common cause blocks it. This visual reasoning prevents many analytical mistakes. - **Statistical significance is not practical significance** (Early): The book walks through standard errors, confidence intervals, p-values, and power using a concrete email experiment. A lift of 8 percentage points may sound impressive until you check whether it could be due to chance. - **Internal validity does not guarantee external validity** (Middle): A well-randomized study can still fail to generalize. The online learning example shows that results from US economics students may not transfer to other populations or settings. - **Repeated observations enable stronger causal claims** (Late): Panel data — tracking the same customers over time — allows difference-in-differences and related methods to control for time-invariant unobserved confounders. - **Effects vary across people and places** (Late): Average treatment effects hide heterogeneity. The book covers how causal effects differ across individuals and geographic locations, and why this matters for targeting and policy. - **Noncompliance dilutes effects** (Ending): When units do not follow their assigned treatment, the estimated effect understates the true effect among compliers. The book examines noncompliance bias and effect dilution as practical complications. 【Reading Tips】 - **Deep-read the early chapters on potential outcomes and bias decomposition.** Everything later builds on this foundation. If the math feels dense, work through the cross-sell email example by hand. - **Skim the statistics review if you are already comfortable with standard errors, confidence intervals, and hypothesis testing.** The book itself says it is not an introductory statistics text; use this chapter as a refresher, not a tutorial. - **Pay close attention to the graphical models chapter.** The chain/fork/collider distinctions are the most transferable conceptual tool in the book — they will change how you look at every dataset. - **Treat the industry examples as templates, not recipes.** The book's strength is showing how each method maps to a business question. When you encounter a new problem, ask which causal structure it resembles. - **Do not skip the sections on validity and noncompliance.** These are where real-world analyses most often go wrong, and the book's treatment of them is more practical than most academic texts. 【Coverage Limits】 The excerpts cover the book's framing, statistical foundations, graphical models, and the beginning of observational methods, but do not include detailed coverage of propensity score matching, synthetic controls, or difference-in-differences implementations. The guide reflects the available material; later chapters are summarized at a higher level.
Page 8
38 The Standard Error of Our Estimates 41 Confidence Intervals 42 Hypothesis Testing 49 Null Hypothesis 51 Test Statistic 53 p-values 54 Power 56 Sample Size...
View in text
Excerpt 2
period (week, in this case). The Treatment and the Outcome Now that you have some data to look at, it’s time to learn our first bit of technicality. Let’s ca...
View in text
Excerpt 3
tatistics is the science that deals with these imprecisions due to random error, so they don’t catch you off-guard. It’s a way to take uncertainty into accou...
View in text
Excerpt 4
s to understanding the language of causal inference. You’ve learned a bit about counterfactual outcomes and biases; enough so you could under‐ stand the key...
View in text
Excerpt 5
is that a naive application of the adjustment formula will suffer from data sparsity if you have lots of covariates. Causal Inference Versus Machine Learning...
View in text
Excerpt 6
on’t be the case. Nonlinearities in Linear Regression | 117 reason, try to keep it as close to a completely random experiment as possible. This means that: •...
View in text
Excerpt 7
thod outputs a two column matrix, where the first column is P Y = 0 X and the second column, P Y = 1 X . You only want the second one, which in this case is...
View in text
Excerpt 8
was simu‐ lated, I know for a fact that the true ATE is –0.8, but the preceding estimate is only –0.66. To improve upon it, you can stabilize the weights by...
View in text
Tags
AI categories
DataPythonTechnology
ISBN: 1098140257
Publisher: O'Reilly Media
Publish Year: 2023
Language: English
Pages: 409
File Format: PDF
File Size: 7.9 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…