TapCub is live — analytics, insights and live chat, free on one platform
Growth & Marketing

A/B Test Hypothesis: Template and Six Examples With Sample Sizes

How to write an A/B test hypothesis: a fill-in template, six examples with baseline, minimum effect, sample size and run length, and a stop rule that survives peeking.

Emma Collins Published Nov 23, 2026 11 min read Growth & Marketing
Sample data: per-group sample sizes from the two-proportion formula. The smaller the baseline and the minimum effect, the more visitors you need.Sample data

An 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].

FieldWhat to writeWhy it matters
EvidenceThe observation behind the idea: funnel drop, heatmap, support questionsSeparates a reasoned bet from a guess
ChangeExactly one thing that differs between A and BIf you change three things you learn nothing about any of them
AudienceWho is eligible and how they are assignedMixed audiences hide effects
Primary metricOne metric, defined as numerator ÷ denominatorSeveral primary metrics means one will be "significant" by chance
Minimum effectThe smallest relative lift worth shippingIt sets the sample size
Stop ruleSample size or end date, fixed in advanceStops peeking from deciding the result
FieldWhat to write
EvidenceThe observation behind the idea: funnel drop, heatmap, support questions
ChangeExactly one thing that differs between A and B
AudienceWho is eligible and how they are assigned
Primary metricOne metric, written as numerator ÷ denominator
Minimum effectThe smallest relative lift worth shipping
Stop ruleSample 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?

BadWhy it failsBetter
"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 metricsOne 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.

#HypothesisPrimary metricBaselineMinimum effectn per groupVisitors per dayRun
1Because shipping cost surprises people at checkout, showing "Free shipping over $50" in the cart will raise purchasesPurchase rate of cart visitors3.0%+20% (3.6%)13,9141,20028 days
2Because the pricing headline never mentions the trial, adding "Free for 14 days" will raise clicksStart-trial clicks per pricing visitor8.0%+15% (9.2%)8,5682,00014 days
3Because 78% of signup starters stop at the form, cutting fields from 5 to 3 will raise completionForm completion rate22.0%+15% (25.3%)2,60250014 days
4Because shoppers ask for sizing in chat, adding a size chart image will raise add-to-cartAdd-to-cart per product-page visitor6.0%+10% (6.6%)25,7403,00021 days
5Because activation within 7 days predicts retention, a day-1 checklist email will raise activation7-day activation rate35.0%+8% (37.8%)4,63526042 days
6Because pricing-page visitors have unanswered questions, a chat invite after 20 seconds will raise conversionConversion rate of pricing visitors4.0%+25% (5.0%)6,7451,50014 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.

app.tapcub.com

Visitors needed per group, six examples

5% significance, 80% power
Ex 4 Size chart, +10% on 6.0%25,740
Ex 1 Free-shipping, +20% on 3.0%13,914
Ex 2 Trial headline, +15% on 8.0%8,568
Ex 6 Chat invite, +25% on 4.0%6,745
Ex 5 Day-1 email, +8% on 35.0%4,635
Ex 3 Shorter form, +15% on 22.0%2,602
Sample data
Sample data: per-group sample sizes from the two-proportion formula. The smaller the baseline and the minimum effect, the more visitors you need.

How 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 changePrimary metricGuardrails
Shorter signup formForm completionShare of signups that activate in 7 days; support contacts per signup
Free-shipping bannerPurchase rateAverage order value; refund rate
Chat inviteConversion rateBounce 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 sampleDecision
Interval for the lift excludes 0 and the lower bound is above the minimum worth shippingShip
Interval excludes 0 but the lower bound is below the minimumShip if cheap to run; otherwise repeat with a larger sample
Interval includes 0Do not ship on this evidence; record that the idea did not show a lift this large
Primary wins, a guardrail breaches its limitDo 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:

  1. 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.
  2. Tag the arm. Have your site send the assigned variant as an event property (for example variant = A or B) on the events you measure.
  3. 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.
  4. 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.
  5. 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

Was this article helpful?

We use your answers to fix and expand this page.

Emma Collins

Product Analyst

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

Measure both arms on one definition

Goals, funnels broken down by your variant property, real-user performance and errors as guardrails, with bots kept out.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics