Skip to content

Packs / data-science-public

ab-test-significance

decide if an A/B test result is significant with a two-proportion z-test and a confidence interval

L2 Checks passed 3 of 3 runsv1.0.0Tech-Realm/space-data-science-public

Install

logicpacks pack use data-science-public/ab-test-significance
get_pack data-science-public/ab-test-significance

The second line is the MCP tool call for the LogicPacks connector (Claude Code, Codex, Claude.ai and others). The first run of a pack someone else wrote asks for your yes.

Keys it needs (names only)

None.

Playbooks included

  • Spec: spec/SPEC.md (goal, steps, edge cases, don’ts)
  • Routes: python-stdlib
  • Checks: 2 in outcome/checks.yaml
  • Code: abtest.py
  • Tools: python3

Usage, last 8 weeks

New: no recorded use yet.

Purpose (from spec/SPEC.md)

Goal

Decide if an A/B test result is significant with a two-proportion z-test and a confidence interval.

Steps

  1. Fix the sample size and the metric before the test starts.
  2. When the test ends, run abtest.py with the counts.
  3. Report lift with its CI, not just 'significant'.

Edge cases

  • Peeking repeatedly inflates false positives; use a fixed horizon.
  • Small counts (<10 conversions per arm) make the normal approximation poor.

Don'ts

  • Don't stop the test the moment p < 0.05.

Routes (free first)

  1. python-stdlib: code/abtest.py (no install).