By MCP Analytics Team | Published , updated
Compare two groups? Find what drives an outcome? Spot a trend? The question decides which statistics fit, so it is the first thing to get right.
The analyses filed under this question. Each card opens the analysis page, where you can run it on a file. Cards marked Coming soon are still being built.
Did a launch, price change or policy move the series?
Did the change cause the difference?
How much of the lift was actually incremental?
What is the causal effect when treatment is confounded? Two-stage least squares with instrument diagnostics.
Does X drive Y through M; conditional effects.
Did crossing the threshold cause the change?
CausalImpact-style counterfactual from donor series; did the intervention move the metric.
Heterogeneous treatment effects; persuadables vs sure-things.
The data. standard_causal_impact_v2.csv, the published sample file for Causal impact: 104 rows; columns week_start, region, weekly_signups, phase, notes. Sample data, not a customer's.
The calculation. Python, standard library only. This exact code ran against the file when this page was built, and printed the output below it.
import csv
rows = list(csv.DictReader(open("standard_causal_impact_v2.csv")))
rows.sort(key=lambda r: r["week_start"])
def series(phase):
return [float(r["weekly_signups"]) for r in rows
if r["phase"] == phase and r["weekly_signups"]]
pre, post = series("before launch"), series("after launch")
mean = lambda v: sum(v) / len(v)
print(len(pre), "weeks before,", len(post), "weeks after")
print("naive lift:", round(mean(post) - mean(pre), 1), "a week")
x = range(len(pre)) # straight line fitted to the weeks before
mx, my = mean(x), mean(pre)
b = (sum((i - mx) * (v - my) for i, v in zip(x, pre))
/ sum((i - mx) ** 2 for i in x))
proj = [my + b * (len(pre) + i - mx) for i in range(len(post))]
print("trend before launch:", round(b, 2), "signups a week, per week")
print("lift over the projected trend:",
round(mean([v - p for v, p in zip(post, proj)]), 1), "a week")
60 weeks before, 44 weeks after
naive lift: 47.6 a week
trend before launch: 0.51 signups a week, per week
lift over the projected trend: 21.1 a week
What it says. Comparing the average week after launch with the average week before says 47.6 extra signups a week. But signups were already rising by 0.51 a week before launch. Projecting that trend forward and measuring against it leaves 21.1 extra a week, 44% of the naive figure. On this reading the rest was already coming.
What it does not say. A straight line is the simplest possible counterfactual, and anything else that changed at launch is mixed into the lift. The library analysis fits the jump and the change in trend by segmented regression, allows for weeks that depend on the week before, and puts a 95% prediction interval around the effect.
Run Causal impact on this file or your own, or open its stored sample report.
Further reading on the method in the worked example. Each reference was looked up and its authors, title, year and venue confirmed between 29 October 2026 and 30 October 2026.
The stored sample report for Causal impact. Each analysis has its own report layout; open its page to see what it returns.
Tell us what went wrong, in your own words. We capture the page you're on automatically, so no need to describe where you are.