Skip to main content

Data analysis · Advanced · 30 min

Analyse an A/B test without peeking or p-hacking

By Padding · Updated 18 Nov 2026
Python 3.15 · NumPy 2.5.5 · SciPy 1.18.1 · statsmodels 0.15.0 · pandas 3.1.1 (checked on python:3.15-slim)

You will check an experiment for sample ratio mismatch, read its main metric once with a confidence interval, see by simulation why daily peeking and extra metrics produce false wins, and write a decision that states its uncertainty.

On this page

An A/B test rarely goes wrong in the maths. It goes wrong in the habits around the maths: opening the dashboard every morning and stopping the day it turns green, checking ten metrics and reporting the one that moved, slicing by device until one slice looks exciting. Each habit is a way to find a "significant" result that is not there.

This tutorial analyses one experiment the careful way, in a fixed order:

  1. write the plan before the data exists
  2. check the traffic split is what you asked for
  3. read the main metric once, on the planned day, with a confidence interval
  4. correct for every other metric you look at
  5. treat segment differences as ideas, not findings
  6. write the decision with its uncertainty
Six boxes in two rows joined by arrows: write the plan, check the split, read the main metric, correct other metrics, look at segments, and write the decision, which is highlighted as the end point
The order matters: each step protects the next one

The experiment is a new one-page checkout tested against the current checkout for 14 days. You generate its logs with a seeded script, so you know the truth in advance: the new checkout lifts conversion from 10.0% to 10.8%, and nothing else changes. Knowing the truth lets you see which analysis habits find it and which ones fool you. Along the way you simulate thousands of experiments with no real effect at all, to measure how often peeking and extra metrics produce a false win.

Step 1 · Create the project and install the libraries

Make a throwaway folder and a virtual environment, then install the four libraries pinned to the versions this tutorial was written against:

Bash
mkdir -p ~/ab-test-demo
cd ~/ab-test-demo
python3 -m venv .venv
. .venv/bin/activate
pip install "numpy==2.5.5" "scipy==1.18.1" "statsmodels==0.15.0" "pandas==3.1.1"
python -c "import numpy, scipy, statsmodels, pandas; print(numpy.__version__, scipy.__version__, statsmodels.__version__, pandas.__version__)"

SciPy does the chi-square test and the normal distribution, statsmodels does the proportion tests and the multiple-testing correction, and pandas reads the logs. The NumPy pin matters for matching numbers: a seeded generator gives the same draws on every machine for one NumPy version, but a later version may draw some distributions differently.

Together the downloads come to several tens of megabytes. On prepaid mobile data, install on Wi-Fi once; pip caches the files, so another project with the same pins downloads nothing.

Check it worked

The last command prints 2.5.5 1.18.1 0.15.0 3.1.1, and your prompt starts with (.venv). In a new terminal, run cd ~/ab-test-demo and . .venv/bin/activate again.

Step 2 · Write the analysis plan before you see any data

Most p-hacking is not deliberate. It happens because the decisions about what to measure and when to stop are made after looking at the numbers. Fix those decisions in a file before the test starts, and every later step reads from that file instead of from your hopes.

Bash
cd ~/ab-test-demo
cat > plan.json <<'JSON'
{
  "test": "one-page checkout",
  "hypothesis": "The one-page checkout raises checkout conversion",
  "primary_metric": "converted",
  "secondary_metrics": ["added_to_cart", "opened_help", "subscribed", "used_coupon", "shared_link", "left_review"],
  "treatment_share": 0.5,
  "alpha": 0.05,
  "users_needed": 40000,
  "days": 14,
  "minimum_worthwhile_lift_points": 0.5,
  "decision_rule": "Ship if the 95% CI for the difference in conversion is above zero. Read once, on day 14."
}
JSON
python3 -m json.tool plan.json > /dev/null && echo "plan.json is valid"

What each field commits you to:

  • primary_metric: the one number that decides the test. Checkout conversion, as 0 or 1 per user.
  • secondary_metrics: everything else you will look at. Listing them now means you cannot quietly add a seventh later because it moved.
  • treatment_share: the split you asked the assignment system for. The next steps test the logs against it.
  • users_needed and days: the sample size and end date. They come from a power calculation; Plan an A/B test with a power calculation shows how to get them.
  • minimum_worthwhile_lift_points: the smallest lift, in percentage points, that pays for building and maintaining the change. A lift can be real and still too small to matter.
  • decision_rule: what you will do with the result, written while you still have no result.

In a team, commit this file or paste it in the test's ticket with a date, so anyone can see it came first.

Check it worked

The command prints plan.json is valid. If it prints a JSON error instead, look for a missing comma or quote near the line number it names.

Step 3 · Generate the experiment logs

Real logs come from your analytics tool or event warehouse as one row per user: when they arrived, which variant they saw, their device, and a 0 or 1 for each metric. make_logs.py produces exactly that shape for 40,000 users over 14 days. Only converted has a real difference; the six other metrics are the same in both variants.

The script also has a --broken mode that simulates a common fault: a redirect bug that loses 10% of treatment users on Android before the logging code runs.

Bash
cd ~/ab-test-demo
. .venv/bin/activate
cat > make_logs.py <<'PY'
"""Generate 14 days of logs for a checkout test: one row per user."""
import sys

import numpy as np
import pandas as pd

rng = np.random.default_rng(20261126)
users = 40_000

variant = np.where(rng.random(users) < 0.5, "treatment", "control")
is_treatment = variant == "treatment"
day = rng.integers(1, 15, size=users)
device = rng.choice(["android", "ios", "desktop"], size=users, p=[0.55, 0.20, 0.25])

# Only checkout conversion has a real effect: 10.0% in control, 10.8% in treatment.
converted = rng.random(users) < np.where(is_treatment, 0.108, 0.100)
added_to_cart = rng.random(users) < 0.30
opened_help = rng.random(users) < 0.05
subscribed = rng.random(users) < 0.08
used_coupon = rng.random(users) < 0.12
shared_link = rng.random(users) < 0.03
left_review = rng.random(users) < 0.04

logs = pd.DataFrame({
    "user_id": np.arange(1, users + 1),
    "day": day,
    "variant": variant,
    "device": device,
    "converted": converted.astype(int),
    "added_to_cart": added_to_cart.astype(int),
    "opened_help": opened_help.astype(int),
    "subscribed": subscribed.astype(int),
    "used_coupon": used_coupon.astype(int),
    "shared_link": shared_link.astype(int),
    "left_review": left_review.astype(int),
})

if "--broken" in sys.argv:
    # A redirect bug loses 10% of treatment users on Android before they are logged.
    lost = is_treatment & (device == "android") & (rng.random(users) < 0.10)
    logs = logs[~lost]
    logs.to_csv("visits_broken.csv", index=False)
    print(f"wrote visits_broken.csv: {len(logs):,} rows")
else:
    logs.to_csv("visits.csv", index=False)
    print(f"wrote visits.csv: {len(logs):,} rows")
PY
python make_logs.py
python make_logs.py --broken
head -3 visits.csv

The assignment uses rng.random(users) < 0.5, a coin flip per user. That is how most platforms assign too (usually a hash of the user ID rather than a random draw), and it means the two groups are never exactly equal in size. The next step asks whether the gap is bigger than chance allows.

Check it worked

You see wrote visits.csv: 40,000 rows, then wrote visits_broken.csv: 38,850 rows, then the header and two rows:

Text
user_id,day,variant,device,converted,added_to_cart,opened_help,subscribed,used_coupon,shared_link,left_review
1,12,control,android,0,1,0,0,0,0,0
2,4,treatment,ios,0,0,0,0,0,0,0

Step 4 · Check for sample ratio mismatch

Before reading any metric, check that each variant got the share of users the plan asked for. If it did not, something removed or added users unevenly, and that something almost never acts at random: a crash that only hits the new page, a bot filter that treats the variants differently, a slow page that loses people before logging fires. The users who are left are no longer comparable, so every metric is suspect. This fault is called a sample ratio mismatch (SRM).

The test is a chi-square goodness-of-fit test: observed counts per variant against the counts the planned split predicts. scipy.stats.chisquare takes both as lists.

Bash
cd ~/ab-test-demo
. .venv/bin/activate
cat > srm.py <<'PY'
"""Sample ratio mismatch check: is the split what the plan said it would be?"""
import json
import sys

import pandas as pd
from scipy import stats

plan = json.load(open("plan.json"))
logs = pd.read_csv(sys.argv[1])
counts = logs["variant"].value_counts()
observed = [counts["control"], counts["treatment"]]
total = sum(observed)
expected = [total * (1 - plan["treatment_share"]), total * plan["treatment_share"]]

result = stats.chisquare(observed, f_exp=expected)
print(f"control {observed[0]:,}, treatment {observed[1]:,}, treatment share {observed[1] / total:.4f}")
print(f"chi-square {result.statistic:.2f}, p = {result.pvalue:.4g}")
if result.pvalue < 0.001:
    print("SRM: the split is broken. Stop and find the cause before reading any metric.")
else:
    print("No SRM: the split matches the plan.")
PY
python srm.py visits.csv
python srm.py visits_broken.csv

The threshold is 0.001, not 0.05, on purpose. You run this check on every test, and with 0.05 one healthy test in 20 would raise a false alarm. A real SRM, like the broken file here, usually gives a far smaller p-value than that anyway.

Notice that the broken file still has a treatment share of 0.4892, which looks almost even to the eye. A loss of a few hundred users in 40,000 is invisible on a dashboard and obvious to the test.

Uneven losses are more likely where pages are heavy and connections are slow. If many of your users are on low-end Android phones or pay for mobile data by the megabyte, a variant that adds a large script or image can lose more of them before the analytics event is sent. That shows up here as an SRM, not as a lower conversion rate.

Check it worked

For visits.csv you see chi-square 2.40, p = 0.1211 and No SRM: the split matches the plan. A share of 0.5039 is within normal coin-flip variation for 40,000 users. For visits_broken.csv you see chi-square 18.16, p = 2.029e-05 and the SRM: warning. From here on, use only visits.csv; in a real test with an SRM you would stop here and find the bug.

Step 5 · Read the primary metric once, with a confidence interval

Now, on the planned day and only once, compare conversion between the variants. Put the comparison in a small module, abtest.py, so later steps use exactly the same calculation:

  • confint_proportions_2indep gives a 95% confidence interval for the difference in conversion rates (treatment minus control). The Newcombe method behaves well even for small rates.
  • proportions_ztest gives the two-proportion z-test: how surprising the difference would be if the variants were truly the same.
Bash
cd ~/ab-test-demo
. .venv/bin/activate
cat > abtest.py <<'PY'
"""Shared helpers: compare a 0/1 metric between treatment and control."""
from statsmodels.stats.proportion import confint_proportions_2indep, proportions_ztest


def compare(logs, metric, alpha=0.05):
    groups = logs.groupby("variant")[metric].agg(["sum", "count"])
    c_t, n_t = groups.loc["treatment"]
    c_c, n_c = groups.loc["control"]
    low, high = confint_proportions_2indep(c_t, n_t, c_c, n_c, compare="diff", method="newcomb", alpha=alpha)
    z, p = proportions_ztest([c_t, c_c], [n_t, n_c])
    return {
        "metric": metric,
        "control": c_c / n_c,
        "treatment": c_t / n_t,
        "diff": c_t / n_t - c_c / n_c,
        "low": low,
        "high": high,
        "z": z,
        "p": p,
        "n": n_t + n_c,
    }
PY
cat > analyse.py <<'PY'
"""The pre-registered primary metric, read once, at the planned end."""
import json

import pandas as pd

from abtest import compare

plan = json.load(open("plan.json"))
logs = pd.read_csv("visits.csv")
r = compare(logs, plan["primary_metric"], alpha=plan["alpha"])

print(f"metric: {r['metric']}")
print(f"control {r['control']:.2%}, treatment {r['treatment']:.2%}")
print(f"difference {r['diff'] * 100:+.2f} points, 95% CI {r['low'] * 100:+.2f} to {r['high'] * 100:+.2f}")
print(f"relative lift {r['diff'] / r['control']:+.1%}")
print(f"z = {r['z']:.2f}, p = {r['p']:.4f}")
PY
python analyse.py

Read the interval before the p-value. The p-value only says the difference is unlikely to be zero. The interval says how big it could plausibly be, which is what the business needs. Here it runs from +0.27 to +1.49 percentage points, so the true lift could be a third of what you measured or nearly double it.

Report the difference in points (11.18% minus 10.30%) and the relative lift (+8.5% of the control rate) separately, and label which is which. "Conversion up 8.5%" and "conversion up 0.88" describe the same result, and mixing them up is a common source of overblown claims.

The measured difference, +0.88 points, is a little above the true +0.8 in the generator. That is normal sampling noise, and the interval covers the truth.

Check it worked

You see:

Text
metric: converted
control 10.30%, treatment 11.18%
difference +0.88 points, 95% CI +0.27 to +1.49
relative lift +8.5%
z = 2.84, p = 0.0046

The whole interval is above zero, so the plan's decision rule says ship. Do not act on that yet: the next steps check what else could mislead you.

Step 6 · Simulate peeking to see why you wait

Suppose you had opened the results every day and stopped the first time p dropped under 0.05. To see what that habit costs, simulate 5,000 A/A tests: experiments where both variants are identical, so every "significant" result is false. Each one runs for 14 days with 1,400 users per variant per day and a 10% conversion rate. The script computes the running z-test after each day with NumPy arrays, then counts how many tests would have been stopped as a win when checked 1, 2, 4, 7 or 14 times, evenly spaced and always including day 14.

Bash
cd ~/ab-test-demo
. .venv/bin/activate
cat > peeking.py <<'PY'
"""Simulate A/A tests (no real difference) and count false positives."""
import numpy as np
from scipy import stats

rng = np.random.default_rng(7)
sims, days, per_day, rate = 5_000, 14, 1_400, 0.10

# Conversions per day for each arm, then running totals as the days go by.
conv_a = rng.binomial(per_day, rate, size=(sims, days)).cumsum(axis=1)
conv_b = rng.binomial(per_day, rate, size=(sims, days)).cumsum(axis=1)
n = per_day * np.arange(1, days + 1)

pooled = (conv_a + conv_b) / (2 * n)
z = (conv_b / n - conv_a / n) / np.sqrt(pooled * (1 - pooled) * 2 / n)
p = 2 * stats.norm.sf(np.abs(z))

print("looks  false-positive rate")
for looks in (1, 2, 4, 7, 14):
    days_seen = np.linspace(days, 0, looks, endpoint=False)[::-1].round().astype(int) - 1
    stopped = (p[:, days_seen] < 0.05).any(axis=1)
    print(f"{looks:>5}  {stopped.mean():.1%}")

# The z threshold that keeps the any-look rate at 5% with 14 daily looks.
max_z = np.abs(z).max(axis=1)
threshold = np.quantile(max_z, 0.95)
print(f"z threshold for 14 looks at 5%: {threshold:.2f} (instead of 1.96)")
PY
python peeking.py

With one look, on day 14, about 5% of A/A tests come out "significant". That is what a 0.05 threshold promises. Every extra look is another chance for random noise to cross the line, and you stop at the first crossing, so the errors add up. Checking daily for two weeks makes more than one in five tests with no effect look like a winner.

Left: a line chart of one A/A test's p-value over 14 days, falling under the dashed 0.05 line on day 4 and ending at 0.44 on day 14. Right: bars showing the false-positive rate rising from 4.9% with 1 look to 8.2%, 12.3%, 16.5% and 22.1% with 14 looks, against a dashed 5% line
Each look is another chance for noise to cross the line

The last line shows one way out. If you must look every day, require |z| above 2.59 on every look instead of 1.96, and the overall false-positive rate goes back to 5%. That is the idea behind a Pocock boundary, one of several group sequential designs. Choose such a design before the test starts and write it in the plan; switching to it after you have seen a promising number does not help. Without one, the safe rule is the one in plan.json: look once, on the planned day.

Watching the dashboard for bugs is fine. Checking that events arrive and the SRM test passes on day 2 protects the test. What breaks it is reading the outcome and acting on it.

Check it worked

You see this table and threshold:

Text
looks  false-positive rate
    1  4.9%
    2  8.2%
    4  12.3%
    7  16.5%
   14  22.1%
z threshold for 14 looks at 5%: 2.59 (instead of 1.96)

The rate climbs with every extra look. Your real test's p-value of 0.0046 corresponds to |z| = 2.84, which would clear even the stricter 2.59 line.

Step 7 · Correct for several metrics

The plan lists six secondary metrics. Test each at 0.05 and the chance that at least one shows a false difference is far above 5%. The Holm method fixes this: it sorts the p-values and compares the smallest with 0.05 divided by 6, the next with 0.05 divided by 5, and so on, stopping at the first that fails. It controls the chance of any false positive across the family and is never less powerful than the plain Bonferroni correction.

multipletests returns the adjusted p-values, which you compare with 0.05 as usual. The script then repeats the A/A simulation for six metrics to show what the correction buys.

Bash
cd ~/ab-test-demo
. .venv/bin/activate
cat > metrics.py <<'PY'
"""Secondary metrics: correct the p-values for testing several at once."""
import json

import numpy as np
import pandas as pd
from scipy import stats
from statsmodels.stats.multitest import multipletests

from abtest import compare

plan = json.load(open("plan.json"))
logs = pd.read_csv("visits.csv")
results = [compare(logs, m) for m in plan["secondary_metrics"]]
pvalues = [r["p"] for r in results]
reject, adjusted, _, _ = multipletests(pvalues, alpha=plan["alpha"], method="holm")

print("metric          diff (points)  raw p   Holm p  significant")
for r, adj, rej in zip(results, adjusted, reject):
    print(f"{r['metric']:<14}  {r['diff'] * 100:>+12.2f}  {r['p']:.4f}  {adj:.4f}  {'yes' if rej else 'no'}")

# Why correct: 2,000 A/A tests, each with the same number of metrics, none of them real.
rng = np.random.default_rng(11)
k, sims, n = len(pvalues), 2_000, 20_000
a = rng.binomial(n, 0.10, size=(sims, k)) / n
b = rng.binomial(n, 0.10, size=(sims, k)) / n
pooled = (a + b) / 2
p = 2 * stats.norm.sf(np.abs(b - a) / np.sqrt(pooled * (1 - pooled) * 2 / n))
raw_any = (p < 0.05).any(axis=1).mean()
holm_any = np.mean([multipletests(row, alpha=0.05, method="holm")[0].any() for row in p])
print(f"A/A tests with {k} metrics where at least one looks significant: raw {raw_any:.1%}, Holm {holm_any:.1%}")
PY
python metrics.py

None of the six secondary metrics moved, which is the truth in this data. The simulation is the more useful result: with six metrics and no real effects, 27.9% of tests show at least one raw p under 0.05, close to the 26.5% you get from 1 − 0.95⁶. After Holm, 4.5% do.

The primary metric stays out of this family because you named it alone in advance. If a report gives equal weight to ten metrics, put all ten in the correction.

Check it worked

You see six rows, each ending in no, with Holm p-values of 1.0000, then:

Text
A/A tests with 6 metrics where at least one looks significant: raw 27.9%, Holm 4.5%

Step 8 · Treat segments as follow-up ideas

Someone will ask whether the new checkout worked better on Android, iOS or desktop. You can answer, but the answer is weak: each segment has a fraction of the users, so its interval is wide, and with several segments one of them will stand out by chance.

Bash
cd ~/ab-test-demo
. .venv/bin/activate
cat > segments.py <<'PY'
"""Segment differences, written down as ideas for the next test, not results."""
import json

import pandas as pd

from abtest import compare

plan = json.load(open("plan.json"))
logs = pd.read_csv("visits.csv")
metric = plan["primary_metric"]

print("device   users   diff (points)  95% CI")
for device, part in logs.groupby("device"):
    r = compare(part, metric)
    print(f"{device:<7}  {r['n']:>6,}  {r['diff'] * 100:>+12.2f}  {r['low'] * 100:+.2f} to {r['high'] * 100:+.2f}")
print("These are follow-up ideas. None of them is a finding.")
PY
python segments.py

iOS looks like the star: +2.14 points, with an interval clear of zero, while Android and desktop intervals cross zero. The tempting headline is "the new checkout works on iOS and not elsewhere". It is wrong. make_logs.py gives every device the same +0.8 point lift. The iOS gap is noise from 8,028 users, and the Android and desktop intervals cross zero only because each holds a part of the sample.

So the output of this step is a sentence, not a claim: "iOS showed a larger lift; if that matters, test it in an experiment sized for iOS alone." Segment looks are a good source of questions for the next test and a poor source of answers for this one.

Check it worked

You see three rows, ordered android, desktop, ios, with these differences and intervals:

Text
android  22,044         +0.58  -0.23 to +1.39
desktop   9,928         +0.53  -0.69 to +1.76
ios       8,028         +2.14  +0.77 to +3.52

Every interval contains +0.8, the true lift for all three devices.

Step 9 · Write the decision with its uncertainty

The last step turns the analysis into a note someone can act on. decision.py reruns the checks from the plan and writes decision.md: the verdict, the interval, what was checked, and what the test does not tell you. An inconclusive result says "no decision", never "no effect": an interval that crosses zero cannot rule out a lift.

Bash
cd ~/ab-test-demo
. .venv/bin/activate
cat > decision.py <<'PY'
"""Write the decision, with its uncertainty, to decision.md."""
import json

import pandas as pd
from scipy import stats
from statsmodels.stats.multitest import multipletests

from abtest import compare

plan = json.load(open("plan.json"))
logs = pd.read_csv("visits.csv")

counts = logs["variant"].value_counts()
total = counts.sum()
share = plan["treatment_share"]
srm_p = stats.chisquare([counts["control"], counts["treatment"]],
                        f_exp=[total * (1 - share), total * share]).pvalue

r = compare(logs, plan["primary_metric"], alpha=plan["alpha"])
secondary = [compare(logs, m) for m in plan["secondary_metrics"]]
moved = multipletests([s["p"] for s in secondary], alpha=plan["alpha"], method="holm")[0]
moved_names = [s["metric"] for s, m in zip(secondary, moved) if m] or ["none"]

low, high, worth = r["low"] * 100, r["high"] * 100, plan["minimum_worthwhile_lift_points"]
if srm_p < 0.001:
    verdict = "No decision: the split is broken (sample ratio mismatch). Fix and rerun."
elif low > 0:
    verdict = "Ship."
elif high < 0:
    verdict = "Do not ship: conversion is lower."
else:
    verdict = "No decision: the result is inconclusive."

lines = [
    f"# Decision: {plan['test']}",
    "",
    f"**{verdict}**",
    "",
    f"- Primary metric ({r['metric']}): {r['control']:.2%} control, {r['treatment']:.2%} treatment.",
    f"- Difference: {r['diff'] * 100:+.2f} points, 95% CI {low:+.2f} to {high:+.2f} (p = {r['p']:.4f}).",
    f"- Read once, on day {plan['days']}, as planned. {r['n']:,} users.",
    f"- Sample ratio check: p = {srm_p:.2g}, {'mismatch' if srm_p < 0.001 else 'no mismatch'}.",
    f"- Secondary metrics that moved after Holm correction: {', '.join(moved_names)}.",
    "",
    "## How sure we are",
    "",
]
if srm_p < 0.001:
    lines.append("Not at all. The groups are not comparable, so none of the numbers above can be trusted.")
elif low > 0 or high < 0:
    lines.append(f"The difference is probably real, but its size is uncertain: "
                 f"anything from {low:+.2f} to {high:+.2f} points fits the data.")
    if 0 < low < worth:
        lines.append(f"The low end is below the {worth:+.2f} points we said would be worth the build, "
                     "so check conversion again a month after launch.")
else:
    lines.append(f"The interval, {low:+.2f} to {high:+.2f} points, includes zero: "
                 "the test cannot tell a lift from no change. This is not evidence of no effect.")
lines += [
    "",
    "## Not decided by this test",
    "",
    "Device segments differ, but the test was not planned or sized to compare them. "
    "Treat any segment gap as an idea for a new test.",
]
with open("decision.md", "w") as f:
    f.write("\n".join(lines) + "\n")
print(f"wrote decision.md: {verdict}")
PY
python decision.py
cat decision.md

The note ships the change and is honest about how sure it is. The interval says the lift is above zero, but its low end, +0.27 points, is under the +0.50 points the plan called worthwhile. That does not reverse the decision; it tells the reader to check conversion again after launch instead of booking the full +0.88 in a forecast.

Check it worked

The script prints wrote decision.md: Ship., and decision.md starts:

Text
# Decision: one-page checkout

**Ship.**

- Primary metric (converted): 10.30% control, 11.18% treatment.
- Difference: +0.88 points, 95% CI +0.27 to +1.49 (p = 0.0046).
- Read once, on day 14, as planned. 40,000 users.
- Sample ratio check: p = 0.12, no mismatch.
- Secondary metrics that moved after Holm correction: none.

It continues with a "How sure we are" section naming the +0.27 to +1.49 range and a "Not decided by this test" section about segments. Point decision.py at visits_broken.csv (change the read_csv line) and the verdict becomes the SRM "No decision" line instead.

When you are done, delete the project with rm -rf ~/ab-test-demo.

Next steps

Need this done for you?

Padding does this work for growing companies, from the first diagnosis to a system that keeps working.

AI-Integrated Solutions

Get new tutorials

New tutorials, about twice a month.