Geo Rollout Analysis: DiD, Segmented Regression & Power
Statistics & ExperimentsModel answerLast updated
Design a full causal analysis for a two-state feature launch — compute DiD estimates, build a segmented time-series model, set guardrails, and size the experiment.
Geo Rollout Diagnosis
Your team ships a redesigned signup flow on 2025-07-15, but only to users in Texas and Florida. A week after launch, leadership flags a line chart showing a 3% drop in nationwide DAU and asks whether the new flow caused it.
You have 30 days of pre-period data (2025-06-15 – 2025-07-14) and 31 days of post-period data (2025-07-15 – 2025-08-14). The table below shows the daily-average DAU for each group:
| Group | Pre-period avg | Post-period avg |
|---|---|---|
| Texas | 500k | 515k |
| Florida | 300k | 303k |
| All other states (control) | 2,000k | 2,060k |
The chart also shows a clear weekend trough pattern, a suspicious step-change around 2025-07-20, and elevated noise starting 2025-07-27 that coincides with a large marketing campaign run in California.
Answer each of the following:
-
Estimand and formula. What causal quantity are you estimating? Write the difference-in-differences (DiD) formula explicitly, justify whether to use levels or logs, and state the identification assumptions.
-
Compute the DiD. Calculate the DiD for Texas alone, Florida alone, and the two states combined (population-weighted). Interpret the sign, magnitude, and what a naïve level comparison would get wrong.
-
Segmented time-series model. Write a regression equation that quantifies the immediate level shift and the slope change at rollout for treated versus control states. Explain how you handle the weekend pattern, the 07-20 break, and why standard OLS standard errors are inadequate here.
-
Guardrail metrics. Propose at least three guardrails beyond DAU. For each, define a concrete threshold and say whether the test is one-sided or two-sided.
-
Power and experiment duration. The two treated states together average 815k DAU/day. You want to detect a 0.5% relative change in DAU with α = 0.05 and 80% power. Estimate the required post-period length, state your key assumptions, and explain whether CUPED or synthetic controls would shorten that duration.
-
Parallel trends and spillover. Describe how you would validate the parallel trends assumption and how you would build or validate a donor pool given the California campaign starting 07-27.
-
Recommendation. Give a concise go/no-go recommendation and list the specific additional data you would request before acting on it.
Hints
Hint 1
The treated states together are less than 30% of national DAU — work out what a −6k DAU/day effect means as a share of the national total before accepting the exec's 3% framing at face value.
Hint 2
With only two treated units, cluster-robust standard errors are unreliable. Think about randomization inference or a wild cluster bootstrap as alternatives, and what that implies for your confidence in any p-value you report.
Hint 3
The 0.5% MDE sounds small, but the binding constraint on experiment length is the day-to-day macro volatility of the log-ratio ln(Y_TX+FL / Y_control), not sampling noise. Estimate that σ first, then plug it into the power formula.
Model answer
Hard Try it yourself first — then compare your approach, complexity and edge cases.
Framing the problem first
Before any formula, notice the arithmetic that should reframe the executive conversation: the treated states had a combined pre-period DAU of 800k against a national total of 2,800k — about 29% of the user base. Even a 2% loss in treated states is only ~0.6% of national DAU. A 3% nationwide dip therefore cannot be attributed to a two-state launch without a much larger effect size than the data will show. Establishing this early demonstrates causal discipline and saves the rest of the analysis from chasing a phantom.
1. Estimand and DiD formula
The target estimand is the Average Treatment Effect on the Treated (ATT): the change in DAU that would have been observed in TX and FL had the new signup flow never launched, during the post-period.
Because the control pool is 2.5× larger than the treated group in raw users, working in levels produces a nonsensical DiD — the control "one unit" dominates. Work on the log (relative) scale:
$$ \widehat{\text{DiD}}s = \bigl[\ln \bar{Y}{s,\text{post}} - \ln \bar{Y}{s,\text{pre}}\bigr] - \bigl[\ln \bar{Y}{C,\text{post}} - \ln \bar{Y}_{C,\text{pre}}\bigr] $$
This approximates a percentage-point growth difference and is scale-invariant. Identification requires:
- Parallel trends in log DAU absent treatment.
- No anticipation — users did not change behavior before 07-15.
- No spillovers from treated to control states (SUTVA).
2. Numerical DiD
First convert to growth rates (approximations to log differences):
| Unit | Pre | Post | Growth |
|---|---|---|---|
| Texas | 500k | 515k | +3.00% |
| Florida | 300k | 303k | +1.00% |
| TX + FL | 800k | 818k | +2.25% |
| Control | 2,000k | 2,060k | +3.00% |
Texas DiD: 3.00% − 3.00% = 0.0 pp. The counterfactual predicts exactly 515k, matching observed — no detectable effect.
Florida DiD: 1.00% − 3.00% = −2.0 pp. Counterfactual: 300k × 1.03 = 309k vs. 303k observed → roughly −6k DAU/day (−1.9%).
Combined (population-weighted, TX weight = 500/800 = 0.625): 0.625 × 0% + 0.375 × (−2%) = −0.75 pp, or about −6k DAU/day on 818k observed.
Interpretation: The negative signal comes entirely from Florida; Texas is a null. A heterogeneous pattern like this is a red flag for a Florida-specific confounder — school calendars, tourism seasonality, or a local event — rather than the feature itself. The naïve level DiD (15k − 60k = −45k) is wrong because it subtracts absolute changes across groups of very different sizes.
Critically, −6k/day is 0.2% of national DAU, not 3%. The executive chart warrants a separate investigation into logging integrity, daylight composition shifts, or the California campaign — not the signup-flow launch.
3. Segmented regression (comparative interrupted time series)
For state s on day t, with rollout date t₀ = 2025-07-15:
$$ \ln Y_{st} = \alpha_s + \gamma_{\text{dow}(t)} + \beta_1 t + \beta_2 \text{Post}_t + \beta_3 (t - t_0)\text{Post}_t + \beta_4 T_s \cdot t + \beta_5 T_s \cdot \text{Post}_t + \beta_6 T_s \cdot (t - t_0)\text{Post}t + \varepsilon{st} $$
- β₅ — immediate level change at rollout for treated vs. control.
- β₆ — slope change (trend) for treated vs. control after rollout.
- γ_dow — day-of-week fixed effects absorb the weekend trough; interact with T_s if the weekly pattern differs between states.
On the 07-20 break: First verify whether it is a weekend artifact or a ramp-to-100% event in the experiment logs. If it is real and independent, add a second Post₂ indicator at 07-20 with its own level and slope terms, and test its significance with a Chow test or sup-Wald test. Do not choose the break date by visually inspecting the chart — that inflates the false-positive rate.
Standard errors: With two treated clusters, conventional cluster-robust SEs are anti-conservative. Use:
- A wild cluster bootstrap (Webb weights) for finite-cluster correction.
- Randomization inference — reassign treatment to placebo state pairs, compute the DiD under each reassignment, and compare the observed estimate to the resulting permutation distribution.
- As a cross-check, collapse to a single series ln(Y_TX+FL) − ln(Ŷ_synthetic) and apply Newey–West HAC with at least 7 lags.
4. Guardrail metrics
The primary metric (DAU) uses a two-sided test because either direction matters to the launch decision.
| Guardrail | Direction | Block threshold |
|---|---|---|
| Onboarding screen crash rate | One-sided (non-inferiority) | +0.05 pp absolute or +5% relative |
| Onboarding p95 load latency | One-sided | +100 ms, or any breach of existing SLO |
| Signup → onboarding completion rate | One-sided | −1% relative |
| New-user D7 retention | One-sided | −0.5 pp absolute |
| Payment / checkout decline rate | One-sided | +0.2 pp absolute |
Guardrails are one-sided because only degradation blocks a launch. Evaluate each at the upper bound of a 90% CI (equivalent to a one-sided 95% test). Set all thresholds before seeing the data.
5. Power and duration
Sampling noise on 815k DAU is negligible (Poisson σ ≈ 900, or 0.1%). The binding variance is state-level macro noise: σ, the residual daily standard deviation of ln(Y_TX+FL / Y_control) after removing day-of-week effects.
The MDE is 0.5% × 815k ≈ 4,075 DAU/day, or 0.5% on the log scale.
$$ \frac{1}{n_{\text{pre}}} + \frac{1}{n_{\text{post}}} = \frac{\delta^2}{(z_{0.975}+z_{0.8})^2 \cdot \sigma^2_{\text{eff}}}, \quad (1.96+0.84)^2 = 7.84 $$
Assume σ = 0.5% and lag-1 autocorrelation ρ = 0.3, giving variance inflation (1+ρ)/(1−ρ) ≈ 1.86, so σ²_eff ≈ 4.6 × 10⁻⁵. With n_pre = 30:
$$ \frac{1}{n_{\text{post}}} = \frac{2.5 \times 10^{-5}}{7.84 \times 4.6 \times 10^{-5}} - \frac{1}{30} \approx 0.069 - 0.033 ;\Rightarrow; n_{\text{post}} \approx 28 \text{ days} $$
Round to 4 full weeks. If σ = 1%, no post-period length is sufficient — the pre-period becomes the binding constraint.
On reducing duration:
- Synthetic control directly reduces σ by fitting a better counterfactual. Required duration scales with σ², so halving σ cuts the needed days roughly 4×. This is the highest-leverage option at the geo level.
- CUPED adds little to geo-aggregate DiD, since differencing already exploits the pre-period. It is highly effective in a user-level analysis.
- The most practical fix is redefining the metric: the feature only touches new users, so total DAU is heavily diluted. Measuring new-user D7 activation with user-level CUPED — or simply running a user-randomized holdout within the two states — offers far better precision.
6. Parallel trends validation and donor pool
Validation steps:
- An event-study plot showing the DiD estimate for each pre-period week as "leads." Leads near zero support parallel trends; run a joint F-test.
- Placebo launch dates within the pre-period: if many produce estimates as large as the real one, the signal is indistinguishable from noise.
- In-space placebos: apply the same model to every state not in the treated group and check whether TX/FL estimates fall in the tail of the resulting distribution.
- Pre-period synthetic fit RMSE: a poor fit signals the donor pool is inadequate.
California campaign (07-27 onward):
- Drop California from the donor pool entirely, or add a CA × Post-07-27 indicator to absorb its shock.
- Check whether the campaign had national reach (national TV, app-store featuring) — if so, it contaminates all control states and the parallel trends assumption breaks for the whole post-period.
Spillovers: Drop or test separately the states bordering TX and FL (Louisiana, Oklahoma, New Mexico, Alabama, Georgia), as cross-state word-of-mouth or shared media markets could leak treatment effects into the control pool.
7. Recommendation
Preliminary no-launch-block, pending three data pulls: The DiD point estimate is small and negative (−0.75 pp combined), driven by Florida alone. Texas shows no effect. Before deciding, request:
- Day-level DAU logs for TX and FL to confirm the 07-20 step is a ramp artifact and not a data pipeline issue.
- New-user funnel metrics (signup completion, D7 retention) split by state — the effect on new users could be meaningfully larger than the total-DAU signal suggests.
- Guardrail metric snapshots (crash rate, latency p95) for the onboarding screens in TX and FL vs. the same screens in control states over the same window.
If guardrails are clean and the Florida signal traces to a seasonal confounder, the feature is likely safe to continue. A go decision should still include a plan to monitor new-user retention weekly and a pre-agreed rollback trigger.