Causal Pitfalls in Observational Retention Regression

Medium · Analytics & Experimentation · Data Scientist · Technical Screen

Prompt

As a Data Scientist on a subscription video platform, you fit an ordinary least squares (OLS) regression predicting each subscriber's retention_index (scored 0 to 100) from avg_daily_stream_mins and a 0/1 indicator got_reengagement_alert (1 if the subscriber was sent a personalized show-recommendation push notification, 0 otherwise).

The fitted table reports:

  • Intercept: 38.5
  • avg_daily_stream_mins: +0.90 (p < 0.001, 95% CI [0.86, 0.94])
  • got_reengagement_alert: +9.6 (p < 0.001, 95% CI [7.8, 11.4])

Today, lifecycle automation only dispatches these push alerts once an account has gone at least 72 hours without streaming. After glancing at the summary table, your Product Manager suggests: "Sending re-engagement alerts boosts retention by nearly 10 points—let's turn them on for every subscriber right away."

Prepare your response covering three parts:

  1. Stakeholder Communication: Explain clearly—in plain product language rather than dense statistical jargon, while keeping the underlying reasoning exact—why the +9.6 slope does not mean sending the alert causes a ~10-point retention gain.
  2. Bias & Confounding Diagnosis: Identify concrete confounding variables, selection-bias pathways (stemming from the 72-hour dormancy rule and push reachability), and control-variable pitfalls that could distort this observational coefficient.
  3. Experimental Design: Propose a rigorous experimentation plan to measure the true causal effect of the alert and safely evaluate whether broader cohorts should ever receive it.

Scope & Expectations

  • Correlation vs. Counterfactual Lift: Separate conditional group differences and tiny p-values from true causal effects, translating the distinction into actionable product risk (such as notification opt-outs and zero overlap on active viewers).
  • Competing Bias Pathways: Diagnose both upward and downward distortions—including mobile app / push opt-in confounding, regression to the mean after a 72-hour pause, and mediator/collider hazards if avg_daily_stream_mins includes post-alert viewing.
  • Clean Randomized Design: Specify randomization at the 72-hour eligibility boundary, Intent-to-Treat measurement, opt-out guardrails, and a separate gated test before extrapolating beyond dormant users.

Step-by-step walkthrough

  1. Translate the regression numbers into plain English first

    Start by writing down what the linear regression equation actually computes:

    predicted_retention = 38.5 + 0.90 * avg_daily_stream_mins + 9.6 * got_reengagement_alert
    
    Example at 25 minutes/day:
      No alert (got_reengagement_alert = 0):  38.5 + 0.90 * 25       = 61.0
      Alerted  (got_reengagement_alert = 1):  38.5 + 0.90 * 25 + 9.6 = 70.6
    

    Three statistical distinctions set up your entire conversation with the Product Manager:

    • Conditional association, not causation: a conditional association compares averages across existing groups who share the same control values. Here, +9.6 means among observed subscribers with the same avg_daily_stream_mins, those who received a re-engagement alert had retention_index scores 9.6 points higher on average. It does not say sending an alert to a subscriber causes their score to jump by 9.6 points.
    • What p < 0.001 and 95% CI [7.8, 11.4] actually measure: a p-value and confidence interval (CI) measure random sampling noise—how much the 9.6 gap might wiggle if we drew another sample from the exact same biased process. They measure zero systematic bias: with millions of subscriber rows, even an apples-to-oranges comparison produces p < 0.001 and a tight CI around the wrong causal number.
    • Linear specification limits: the equation forces the same +9.6 shift at every viewing level (no interaction term) and isn't even bounded to 0–100 (at 60 minutes/day with an alert, 38.5 + 54.0 + 9.6 = 102.1).
  2. Give the Product Manager a jargon-free explanation

    Frame the message in business language without statistical jargon:

    "Right now, +9.6 tells us that the kind of subscriber who received an alert retained nearly 10 points better than subscribers with the same daily streaming minutes who didn't—not that the alert created those 10 points. Because automation only alerted people who paused for 72+ hours and had mobile push notifications enabled, our two groups were already very different before any message went out. Statistical significance (p < 0.001) only tells us the 9.6-point gap isn't a coin-flip fluke; it can't tell whether the alert worked or whether push-enabled subscribers simply retain better anyway."

    Pair that with an everyday analogy: people who receive workout reminders from a fitness app exercise more than the general public, not because one ping magically adds 10 points of fitness, but because only people motivated enough to install the app and keep notifications enabled could receive the ping in the first place.

    Connect directly to product risk: if we blast push alerts to every active subscriber tomorrow based on an inflated observational number, we risk annoying nightly viewers, driving permanent notification opt-outs or app uninstalls, and seeing almost none of the promised ~10-point lift.

  3. Unpack the confounders and selection bias behind the 72-hour rule

    Two terms make the bias mechanisms precise:

    • Selection bias: systematic distortion caused by the rule deciding who enters the alerted vs. unalerted groups.
    • Confounder: an unmeasured or omitted factor (such as underlying platform loyalty or mobile push opt-in) that affects both got_reengagement_alert and retention_index.

    At first glance, the rule "only alert subscribers inactive for at least 72 hours" sounds like it should make alerted users look worse, yet the regression shows +9.6. That happens because multiple real-world mechanisms pull in opposite directions:

    Mechanism                                    Direction on +9.6   Why it happens
    -------------------------------------------  ------------------  -----------------------------------------
    1. Push reachability / opt-in confounder     Biases UPWARD (+)   Alerted users MUST have the mobile app +
                                                                     push enabled; TV-only, web-only, and
                                                                     push-off users all sit in `alert = 0`.
    2. Quiet churners lose reachability          Biases UPWARD (+)   Users who already uninstalled the app or
                                                                     muted pushes stay dormant 72h+ yet can
                                                                     never receive a push -> land in `alert = 0`
                                                                     with rock-bottom retention.
    3. Regression to the mean                    Biases UPWARD (+)   A 72h pause often reflects a busy trip or
                                                                     midterm week; viewing rebounds naturally
                                                                     and the model credits the alert.
    4. Genuine 72-hour dormancy risk             Biases DOWNWARD (-) Truly slipping subscribers trigger the 72h
                                                                     rule more often than habitual watchers.
    

    Regression to the mean simply means extreme short-term dips (zero streaming for three days) naturally drift back toward a subscriber's normal average over the next month even with zero intervention. Because upward and downward forces mix in unknown proportions, +9.6 is neither a ceiling nor a floor on the true causal effect.

  4. Walk through a zero-effect numeric example and Python simulation

    Suppose the re-engagement alert has zero causal effect (+0.0) on every single subscriber in a 1,000-account snapshot:

    Segment                                 Users   got_reengagement_alert   Avg retention_index
    --------------------------------------  -----   ----------------------   -------------------
    Mobile push ON, dormant 72h+ (alerted)    250             1                     72.0
    Mobile push ON, active (< 72h)            250             0                     84.0
    TV / web / push OFF (unreachable)         500             0                     57.0
    
    Alerted group average   = 72.0
    Unalerted group average = (250 * 84.0 + 500 * 57.0) / 750 = 49,500 / 750 = 66.0
    Naive observed "lift"   = 72.0 - 66.0 = +6.0 points  (even though true lift is 0.0!)
    

    Notice the trap: compared to reachable mobile peers, dormant alerted subscribers actually score 12 points lower (72.0 vs. 84.0), yet pooling unreachable 57.0-score subscribers into the 0 bucket manufactures a +6.0 illusion!

    Controlling linearly for avg_daily_stream_mins does not fix an omitted confounder like push opt-in / baseline loyalty. In this 100,000-subscriber simulation, the alert's true effect in the retention formula is literally 0:

    import numpy as np
    
    rng = np.random.default_rng(11)
    n = 100_000
    
    # Hidden trait: loyal fans enable mobile push AND retain better beyond minutes streamed
    loyalty = rng.normal(0.0, 1.0, n)
    push_opt_in = rng.random(n) < 1.0 / (1.0 + np.exp(-1.5 * loyalty))
    dormant_72h = rng.random(n) < 0.28
    
    got_reengagement_alert = push_opt_in & dormant_72h
    avg_daily_stream_mins = 28.0 + 9.0 * loyalty - 6.0 * dormant_72h + rng.normal(0.0, 5.0, n)
    
    # True causal effect of `got_reengagement_alert` is 0.0!
    retention_index = 36.0 + 0.55 * avg_daily_stream_mins + 14.0 * push_opt_in + rng.normal(0.0, 9.0, n)
    
    design_matrix = np.column_stack([np.ones(n), avg_daily_stream_mins, got_reengagement_alert])
    intercept, b_mins, b_alert = np.linalg.lstsq(design_matrix, retention_index, rcond=None)[0]
    # Output: intercept ≈ 34.36, b_mins ≈ 0.83, b_alert ≈ +8.03 (p < 0.001!)
    

    Even after controlling for avg_daily_stream_mins, the regression invents a highly significant +8.03 alert effect out of pure confounding.

  5. Watch out for mediator and collider bias in avg_daily_stream_mins

    Look closely at when avg_daily_stream_mins was recorded. If it includes streaming after the alert was sent, controlling for it introduces post-treatment bias through two causal structures:

                   Unobserved Loyalty
                  /         |         \
                 v          v          v
      Push Alert ──> Post-Alert Mins ──> Retention Index
            \___________________________________^
    
    • Mediator bias (blocking the true mechanism): a mediator sits on the causal pathway from action to outcome (Alert -> Post-Alert Mins -> Retention Index). A show-recommendation alert raises retention by convincing the subscriber to come back and stream. Holding post-alert minutes fixed asks "what does the alert do if it isn't allowed to change how much people watch?"—hiding the very mechanism you want to measure.
    • Collider bias (apples-to-oranges matching): a collider is a variable jointly caused by two upstream factors (Alert -> Post-Alert Mins <- Unobserved Loyalty). If an alerted subscriber and an unalerted subscriber both averaged 25 minutes after the trigger, the unalerted subscriber reached 25 minutes on their own, whereas the alerted subscriber needed a push prompt to get there—meaning the alerted subscriber has lower underlying loyalty, distorting the comparison downward.

    Rule: only control for variables measured strictly before the 72-hour trigger (prior 30-day minutes, account tenure, primary device, push permission status).

  6. Why "send to everyone" fails even if +9.6 were causal for dormant users

    Suppose +9.6 somehow were the exact causal lift for dormant subscribers. That estimate still applies only to dormant (72h+), push-enabled accounts. Applying it to daily active viewers is extrapolation without overlap—predicting treatment impact for a segment where 0% of historical accounts ever received the treatment.

    Active subscribers react very differently from dormant ones:

    • Ceiling effect: an engaged viewer watching a nightly drama at 8 PM was already coming back, so the upside on retention is near zero.
    • Notification fatigue: pinging active viewers trains them to mute OS notifications, destroying your ability to reach them months later when they actually go dormant and risk canceling.
  7. Design a randomized experiment to measure the true lift

    Propose a clean two-stage Randomized Controlled Trial (RCT / A/B test) framework:

    Stage 1: Trigger-point randomized holdout (measures the current campaign's true lift)

    1. Eligibility & random split: the exact moment a push-reachable account crosses 72 hours without streaming, hash user_id into 50% Treatment (send re-engagement alert) and 50% Control holdout (suppress alert, logging eligible_trigger_timestamp identically in both arms).
    2. Intent-to-Treat (ITT) analysis: Intent-to-Treat compares all accounts assigned to Treatment against all accounts assigned to Control, whether or not the push was delivered or tapped—preserving random balance so self-selection cannot creep back in.
    3. Metrics & variance reduction: set one primary metric (e.g., 30-day post-trigger retention_index) plus guardrail metrics (push opt-out rate, app uninstalls, subscription cancellations). Adjust for pre-trigger 30-day streaming using CUPED (regression adjustment on pre-experiment baseline covariates) to shrink confidence intervals without bias.
    4. Worked sample size: to detect a realistic +1.5-point lift on retention_index (assuming historical SD = 18 points, two-sided significance α = 0.05 -> 1.96, and 80% power -> 0.84):
    n_per_arm = 2 * (1.96 + 0.84)^2 * 18^2 / 1.5^2
              = 2 * 7.84 * 324 / 2.25
              ≈ 2,258   (about 2,260 triggered subscribers per arm, ~4,520 total)
    
    If using a binary 7-day return rate (lifting 35% -> 37%):
    n_per_arm = (1.96 + 0.84)^2 * (0.35 * 0.65 + 0.37 * 0.63) / 0.02^2
              = 7.84 * 0.4606 / 0.0004 ≈ 9,028   (about 9,030 triggered subscribers per arm)
    

    Stage 2: Stratified expansion test (answers the PM's "send to everyone" proposal)

    • Run a separate, small-traffic A/B test across active inactivity buckets (0–24h, 24–72h) with strict opt-out guardrails, plus a 5% long-term global holdout for a quarter to capture multi-alert habituation.
    • Fallback if engineering cannot randomize immediately: exploit the 72-hour threshold via a Regression Discontinuity Design (RDD)—comparing short-term return rates of push-enabled users sitting just above 72.0 hours inactive (e.g., 72–74h, alerted when the batch job runs) against nearly identical users just below (70–72h, not yet alerted), verifying no other email or promo fires at 72h.

Intuition & how it works

Imagine reading a gym study showing that members who received a "We miss you—come work out!" phone notification had fitness scores nearly 10 points higher than everyone else who logged the same gym minutes that week, and concluding you should blast that alert to every resident in the city. Who could get that alert? Only people who already cared enough to install the fitness app and enable notifications—while couch potatoes without the app and ex-members who already deleted it all sat in the "no notification" bucket!

Taking the +9.6 regression slope at face value fails for the exact same reason. Re-engagement alerts were never assigned at random: automation targeted accounts inactive for 72+ hours that were reachable by mobile push, mixing the alert's real impact with pre-existing differences in app installation, notification opt-in, and silent churn (p < 0.001 only rules out small-sample luck, not a biased comparison). Worse, if avg_daily_stream_mins includes post-alert streaming, controlling for it blocks the very viewing boost the alert creates and introduces collider bias—and active daily viewers (0% alerted in the data) may simply mute notifications if spammed.

Walk through 1,000 subscribers where the push alert has zero true causal effect (+0.0):

  1. 250 mobile push-enabled, dormant 72h+ subscribers receive the alert (got_reengagement_alert = 1) and average 72.0 on retention_index.
  2. 250 mobile push-enabled, active subscribers (got_reengagement_alert = 0) average 84.0, while 500 TV-only / notifications-off subscribers (got_reengagement_alert = 0) average 57.0.
  3. Pooling the 750 unalerted accounts gives (250 * 84.0 + 500 * 57.0) / 750 = 66.0, creating an apparent 72.0 - 66.0 = +6.0 lift out of thin air—which only a trigger-point randomized holdout (randomly withholding the alert from 50% of eligible 72h-dormant accounts) can separate from selection bias.

Key points

  • Conditional association vs. causal lift: +9.6 compares observed alerted vs. unalerted subscribers holding avg_daily_stream_mins fixed; p-values and confidence intervals shrink with sample size (1 / sqrt(n)) even when selection bias (non-random group assignment) makes the estimate completely wrong.
  • Competing biases make the sign indeterminate: push reachability (mobile app + opt-in) and churners disabling notifications/uninstalling push +9.6 upward, regression to the mean (temporary 72h pauses rebounding naturally) pushes it upward, and genuine 72-hour dormancy risk pushes it downward.
  • Pre-treatment vs. post-treatment controls: if avg_daily_stream_mins is measured after the alert, it acts as both a mediator (an intermediate step Alert -> Minutes -> Retention whose effect gets subtracted out) and a collider (a shared outcome of Alert and hidden Loyalty that skews comparisons when held fixed). Control strictly for pre-trigger features.
  • No extrapolation to active viewers: zero active (< 72h inactive) subscribers received alerts in this dataset, so extending +9.6 to everyone violates positivity / overlap and ignores notification opt-out costs.
  • Clean experimental design: randomize 50/50 at the exact 72-hour eligibility trigger, analyze by Intent-to-Treat (comparing assigned arms regardless of opens/taps), guard push opt-outs and uninstalls, and run a separate stratified experiment before expanding to active cohorts.

Common mistakes

  • Treating p < 0.001 as proof of causality: low p-values mean the observed gap is unlikely to be random sampling noise; in large observational tables, small confounding biases routinely produce tiny p-values.
  • Claiming the 72-hour rule only biases the estimate downward: forgetting that got_reengagement_alert = 1 also requires push reachability—whereas TV-only accounts and churned uninstallers are locked into got_reengagement_alert = 0—misses why observational lifecycle lifts are so often inflated upward.
  • "Fixing" bias by adding more post-alert controls: controlling for post-alert streaming minutes, app opens, or alert taps introduces post-treatment bias instead of removing confounding.
  • Comparing alert openers/tappers against Control in the A/B test: filtering the treatment arm to engaged tappers destroys randomization and re-introduces upward selection bias; always use Intent-to-Treat (or random assignment as an instrumental variable for local treatment effects).
  • Rolling out to 100% of active subscribers based on a dormant-user A/B test: a positive lift on 72h-dormant subscribers says nothing about whether nightly viewers will churn or disable notifications when spammed.

Follow-up questions

  • Suppose you discover the alerting system mainly targeted historically heavy viewers flagged by a churn-risk model—how would you modify an observational analysis, and where can adjustment still break down? Historical viewing and the exact churn-risk score are now classic confounders driving both alert assignment and future retention, so you must condition on them measured strictly prior to the trigger (e.g., pre-trigger 30-day streaming minutes, session frequency, tenure, push opt-in, and the logged risk score) while dropping post-alert streaming. Better than plain linear regression, estimate a propensity score P(alert = 1 | X_pre) and use doubly robust estimation (combining outcome modeling with inverse-probability weighting) plus an alert * historical_engagement interaction term. Before trusting any adjusted number, inspect propensity overlap: if deterministic targeting rules sent the alert to virtually 100% of high-history flagged accounts (P ≈ 1), no untreated comparison peers exist and only a randomized holdout can identify the effect.
  • Why does adding a post-alert engagement metric such as alert tap count as a regression control distort the estimated effect? Because taps happen after the alert (0 taps by definition for everyone in Control, and 1+ taps only among motivated Treatment subscribers), conditioning on taps both blocks the alert's causal path through tapping and splits Treatment by unobserved motivation. For a concrete numeric trace, suppose a clean 1,000-vs-1,000 A/B test has Control average 70 (0 taps) and Treatment average 72 (a true +2 causal lift!), where 300 one-tap subscribers average 86 and 700 zero-tap subscribers average 66 ((300 * 86 + 700 * 66) / 1000 = 72.0). Regressing retention on alert + taps compares zero-tap alerted subscribers (66) against all of Control (70), flipping the estimated alert coefficient to -4.0 (66 - 70) alongside +20.0 for taps—making a helpful +2 feature look actively harmful! Always treat taps as a secondary funnel outcome, never a regression control.
  • How would you walk non-technical stakeholders through a randomized holdout result that comes back much smaller than the +9.6 regression estimate? Explain that the observational +9.6 combined who the subscribers already were (mobile app installed, notifications enabled, hadn't uninstalled) with what the alert changed, whereas the randomized holdout equalized both groups up front to isolate the alert's true incremental lift—making the A/B result the reliable number for business planning. Walk them back to the zero-effect table (+6.0 apparent gap from reachability differences alone) and note two mechanical differences: Intent-to-Treat averages across all eligible accounts (including undelivered or unseen alerts), and the test measures a defined post-trigger window. Close with a concrete rollout recommendation weighing incremental retained subscribers from the A/B lift against any observed increase in push opt-outs.

Follow-up questions

Similar questions

More Hulu interview questions

All 2 Hulu questions →