Try it on your own data
Every report in this article is in the free plan. One snippet for web and apps, up to 10 sites.
Start freeAn A/B test hypothesis is a prediction written before the test: this change, for this audience, will move this one metric by at least this much, and the test ends by this rule. Use the template below, fill all six fields and size the test before launching. Six sample hypotheses show baseline, minimum effect, visitors per group and run length; a simulation shows why the stop rule must be fixed in advance.
What you will learn
- One change, one primary metric, a minimum effect and a stop rule are the four things a testable hypothesis cannot skip
- Size the test first: at a 3.0% baseline, +20% needs 13,914 visitors per group and +50% needs about 2,517
- Reading once at the planned sample gave 5.1% false winners in our A/A simulation; stopping at the first daily p < 0.05 gave 22.6%
What is an A/B test hypothesis?
An A/B test hypothesis is a written prediction, made before the test starts, that a specific change will move a specific metric by at least a specific amount for a specific audience, plus the rule that decides when the test is over. It has two parts that people mix up:
- The product hypothesis: the reason you believe the change will help ("visitors leave the cart because shipping cost is a surprise"). The idea behind it is covered in product hypothesis.
- The statistical hypothesis: the null (there is no difference in the metric between A and B) and the alternative (there is). The test tells you how surprising your data would be if the null were true; the background is in hypothesis testing and in the two-proportion test in the NIST/SEMATECH handbook.
Most weak hypotheses ("a green button will do better") fail because they leave out the metric, the size of the effect that would matter, or the stopping rule. The rest of this page gives a fill-in template, six completed examples with sample sizes, and the stopping rule that keeps the result honest. The overall process of running tests is in the A/B testing guide.
What is the template for a testable hypothesis?
Use one sentence, then six fields:
Because [evidence], we believe that [change] for [audience] will [direction] [primary metric]. We will call it a win if [metric] improves by at least [minimum effect] with [n] visitors per group and no guardrail metric worsens beyond [limit]. The test ends when [stop rule].
| Field | What to write | Why it matters |
|---|---|---|
| Evidence | The observation behind the idea: funnel drop, heatmap, support questions | Separates a reasoned bet from a guess |
| Change | Exactly one thing that differs between A and B | If you change three things you learn nothing about any of them |
| Audience | Who is eligible and how they are assigned | Mixed audiences hide effects |
| Primary metric | One metric, defined as numerator ÷ denominator | Several primary metrics means one will be "significant" by chance |
| Minimum effect | The smallest relative lift worth shipping | It sets the sample size |
| Stop rule | Sample size or end date, fixed in advance | Stops peeking from deciding the result |
| Field | What to write |
|---|---|
| Evidence | The observation behind the idea: funnel drop, heatmap, support questions |
| Change | Exactly one thing that differs between A and B |
| Audience | Who is eligible and how they are assigned |
| Primary metric | One metric, written as numerator ÷ denominator |
| Minimum effect | The smallest relative lift worth shipping |
| Stop rule | Sample size and minimum days, fixed in advance |
Fill every field before the test starts.
What does a bad hypothesis look like next to a good one?
| Bad | Why it fails | Better |
|---|---|---|
| "A bigger button will improve conversions." | No metric definition, no size, no audience | "Because 41% of cart visitors never click Checkout, making the Checkout button full-width on mobile will raise the cart-to-checkout rate from 59% to at least 63% (+7% relative)." |
| "The new page will be better." | "Better" is not a metric | "The new pricing headline will raise Start-free-trial clicks per pricing-page visitor from 8.0% to 9.2% or more." |
| "We will run it for a while and see." | The result decides when to stop | "The test ends after 8,568 visitors per group and at least 14 full days." |
| "It will increase revenue and signups and engagement." | Three primary metrics | One primary (signup rate); revenue per visitor and bounce are guardrails |
Six hypothesis examples with sample sizes
Sample data. Each uses 5% two-sided significance and 80% power, and the visitors per day are for the audience that sees the page (split evenly between A and B). The sample size per group is the standard two-proportion formula; the run length is rounded up to whole weeks so each weekday appears equally in both groups, with a minimum of 14 days.
| # | Hypothesis | Primary metric | Baseline | Minimum effect | n per group | Visitors per day | Run |
|---|---|---|---|---|---|---|---|
| 1 | Because shipping cost surprises people at checkout, showing "Free shipping over $50" in the cart will raise purchases | Purchase rate of cart visitors | 3.0% | +20% (3.6%) | 13,914 | 1,200 | 28 days |
| 2 | Because the pricing headline never mentions the trial, adding "Free for 14 days" will raise clicks | Start-trial clicks per pricing visitor | 8.0% | +15% (9.2%) | 8,568 | 2,000 | 14 days |
| 3 | Because 78% of signup starters stop at the form, cutting fields from 5 to 3 will raise completion | Form completion rate | 22.0% | +15% (25.3%) | 2,602 | 500 | 14 days |
| 4 | Because shoppers ask for sizing in chat, adding a size chart image will raise add-to-cart | Add-to-cart per product-page visitor | 6.0% | +10% (6.6%) | 25,740 | 3,000 | 21 days |
| 5 | Because activation within 7 days predicts retention, a day-1 checklist email will raise activation | 7-day activation rate | 35.0% | +8% (37.8%) | 4,635 | 260 | 42 days |
| 6 | Because pricing-page visitors have unanswered questions, a chat invite after 20 seconds will raise conversion | Conversion rate of pricing visitors | 4.0% | +25% (5.0%) | 6,745 | 1,500 | 14 days |
Notice what the table says before any test runs. Example 5 needs 42 days because only 260 people a day enter it: either accept the six weeks, test a larger change, or do not test. Example 4 asks for a +10% lift on 6.0% and needs 25,740 per group; a +30% change in the same page would need about 3,100.
Visitors needed per group, six examples
5% significance, 80% powerHow do you work out the sample size for one of these?
Take example 1 and do it by hand:
- Baseline p₁ = 3.0%, minimum effect +20%, so p₂ = 3.0% × 1.2 = 3.6%; the difference is 0.6 points.
- With 5% two-sided significance (z = 1.96) and 80% power (z = 0.84), the per-group sample is about 13,914 visitors.
- At 1,200 cart visitors a day split evenly, each group gets 600 a day: 13,914 ÷ 600 = 23.2 days, rounded up to 4 whole weeks = 28 days.
If you cannot afford 28 days, you have three honest options: a larger minimum effect (+50% needs about 2,517 per group at a 3.0% baseline), a metric with a higher baseline (cart-to-checkout instead of purchase), or no test. The fourth option, running the test and stopping when it looks good, is the dishonest one.
What is a good stop rule?
State it in the hypothesis: "ends when each group has n visitors and at least 14 days have passed" (to cover two full weekly cycles). Then read the result once.
The reason is measurable. Sample data from a simulation of 2,000 A/A tests (both groups identical, a 5% conversion rate, 500 visitors per group per day for 14 days): if you declare a winner the first time any daily check shows p < 0.05, 22.6% of tests report a false winner. If you read only at day 14, the rate is 5.1%, as the 5% significance level promises. The effect of repeated looking is well documented; see Johari and co-authors, Peeking at A/B Tests (KDD 2017). The simulation above is ours, with the settings stated so you can reproduce it.
If you must watch the test, watch for harm (a guardrail collapsing) and for instrumentation problems (one group getting no traffic), not for a win.
What are guardrail metrics and which should you pick?
A guardrail is a metric that must not get worse while the primary metric improves. Choose two or three, and write the limit:
| Example change | Primary metric | Guardrails |
|---|---|---|
| Shorter signup form | Form completion | Share of signups that activate in 7 days; support contacts per signup |
| Free-shipping banner | Purchase rate | Average order value; refund rate |
| Chat invite | Conversion rate | Bounce rate; page load time at the 75th percentile |
A shorter signup form that lifts completion by 15% and halves the activation rate is a loss. The guardrail is how you notice.
How should you decide before the result?
Write the decision table while you still do not know the answer:
| Result at the planned sample | Decision |
|---|---|
| Interval for the lift excludes 0 and the lower bound is above the minimum worth shipping | Ship |
| Interval excludes 0 but the lower bound is below the minimum | Ship if cheap to run; otherwise repeat with a larger sample |
| Interval includes 0 | Do not ship on this evidence; record that the idea did not show a lift this large |
| Primary wins, a guardrail breaches its limit | Do not ship; investigate the trade-off |
Set the minimum effect to what you could plausibly see, not what you hope for: among the rules of thumb in Kohavi and co-authors' Seven Rules of Thumb for Web Site Experimenters is that changes rarely have a big positive impact.
How do you measure the test in TapCub?
TapCub does not run A/B tests: it has no experiment, traffic-splitting or feature-flag function. Your own site or testing tool decides who sees A or B. TapCub's job is the measurement:
- Define the primary metric once. In Web analytics › Goals, set the event or page that counts as the conversion, so both groups use the same definition.
- Tag the arm. Have your site send the assigned variant as an event property (for example
variant = AorB) on the events you measure. - Compare the arms. In All-platform analytics › Behavior › Behavior analysis, build the funnel for your primary metric (2 to 20 steps, 7-day window by default) and break it down by the variant property; the breakdown keeps the 10 groups with the most entries.
- Watch the guardrails. Monitoring › Performance shows real-user load metrics by page and device, and Monitoring › Errors shows error rate and affected visitors, so a slow or broken variant shows up.
- Keep bots out. Bots and AI crawlers are counted on their own report, so they do not dilute either arm's rate.
Copy the visitor and conversion counts for each arm into the two-proportion test; TapCub does not compute significance for you.
FAQ
How do you write an A/B test hypothesis?
Name the evidence, the single change, the audience, one primary metric with its definition, the smallest effect worth shipping, the sample size and the stop rule. Use the sentence template above and fill every field before the test starts.
What is a good example of an A/B test hypothesis?
"Because 41% of cart visitors never click Checkout, making the button full-width on mobile will raise the cart-to-checkout rate from 59% to at least 63%, measured per cart visitor, with 5,000 visitors per group and a 14-day minimum."
What are the null and alternative hypotheses in an A/B test?
The null says the two versions have the same true conversion rate. The alternative says they differ. The test reports how likely a gap this large would be if the null were true.
How long should an A/B test run?
Until the planned sample per group is reached and at least two full weeks have passed, whichever is later. At 3.0% baseline and a +20% minimum effect, that is 13,914 visitors per group.
Can I stop an A/B test early if it looks like a winner?
Only if the plan was built for early stopping. In the simulation above, stopping at the first daily p < 0.05 gave a false winner in 22.6% of identical-group tests instead of 5.1%.
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods, 7.3.3 Two-sample test for proportions: the hypotheses, the pooled z-test and its large-sample condition (checked 2026-11-23).
- Johari, Koomen, Pekelis and Walsh (2017), Peeking at A/B Tests, KDD 2017: repeated looking inflates false positives.
- Kohavi, Deng, Longbotham and Xu (2014), Seven Rules of Thumb for Web Site Experimenters, KDD 2014, pp. 1857–1866 (page checked 2026-11-23).
Was this article helpful?
We use your answers to fix and expand this page.
Couldn’t send. Please try again in a minute.
Thanks for the feedback. We’ll use it to improve this page.You’ve already sent feedback on this page. Thanks.

Product Analyst
Focuses on event analysis, conversion funnels, and retention, using clear metric definitions and structured analysis to explain product performance.
