# ab-test-significance

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

- **Space:** data-science-public (https://github.com/Tech-Realm/space-data-science-public/tree/main/ab-test-significance)
- **Level:** L2 (as the registry reports it)
- **Keys it needs (names only):** none
- **Tools:** python3
- **Routes:** python-stdlib; checks: 2
- **Uses:** new (no recorded use yet)
- **Install:** `logicpacks pack use data-science-public/ab-test-significance` or MCP `get_pack data-science-public/ab-test-significance`
- **Files:** CHANGELOG.md, code/abtest.py, outcome/EVIDENCE.md, outcome/checks.yaml, outcome/results.json, pack.yaml, refs/refs.yaml, spec/SPEC.md, spec/source.md

## Purpose (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).



---

Canonical URL: https://logicpacks.io/packs/data-science-public/ab-test-significance

Developed by TechRealm (techrealm.online), the software team. Operated by Al Jash Trading (Establishment), Abu Dhabi, since 1994, the legal entity that hosts and is responsible for the service. Economic licence CN-1030597, Abu Dhabi Registration Authority. Address: Office 5, Bani Yas West 4, Bani Yas, Abu Dhabi, UAE. Website: https://aljashtrading.com. Contact: hello@logicpacks.io, security@logicpacks.io, WhatsApp +1 713 632 2262 (https://wa.me/17136322262).

Machine-readable index: [/llms.txt](/llms.txt). Plain facts: [/about.md](/about.md). Safety: [/safety.md](/safety.md).
