ds@mcpanalytics.aiEmail your data and your question and get an answer about your own data, with the method shown.Email your data and question. Get an answer.
Did it actually cause it? Cause & effect analyses | MCP Analytics
Question

Did it actually cause it?

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.

See a worked example

How the analyses here work

Cause & effect: prebuilt analyses

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.

Worked example

How many extra weekly signups did the launch bring?

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.

Sources

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.

  1. Brodersen K, Gallusser F, Koehler J, Remy N, Scott S (2015). Inferring causal impact using Bayesian structural time-series models. The Annals of Applied Statistics. https://doi.org/10.1214/14-AOAS788
  2. Card D, Krueger A (1993). Minimum Wages and Employment: A Case Study of the Fast Food Industry in New Jersey and Pennsylvania. NBER Working Paper w4509 (Oct 1993). https://doi.org/10.3386/w4509

By MCP Analytics Team. Updated November 2026. Analysis list from the library catalog.

A delivered report from this list

Causal impact: sample report Open full report →

The stored sample report for Causal impact. Each analysis has its own report layout; open its page to see what it returns.