(+351) 21 24 10006  ·  info@bconcepts.pt
Carnaxide, Lisbon
A/B testing: how to design experiments you can trust
Analytics

A/B testing: how to design experiments you can trust

João Barros 05/07/2026 7 min

Few decision tools are as often cited — and as often misused — as the A/B test. The idea is seductive in its simplicity: you show version A to half the people, version B to the other half, and let the data say which one wins. Done well, it's the most honest way to know whether a change actually improves anything. Done badly, it's a machine for producing false certainties.

The problem is that most mistakes aren't visible in the final chart. A test that stopped too early, a sample that was too small, a metric chosen in a hurry — none of it shows up in the number presented in the meeting. The result looks like science, but the decision it drives can be worse than not testing at all.

This guide walks through what it takes to design an A/B test you can trust: from the hypothesis to the metric, from sample size to reading significance, ending with the mistakes that most often ruin good intentions. No hermetic formulas — just the reasoning that separates a serious test from data theater.

What an A/B test is (and isn't)

An A/B test is a controlled experiment: you randomly split users into two groups, expose each group to one variant, and compare the resulting behavior on a metric defined up front. Randomness is the heart of the method — it's what guarantees that, on average, the two groups are comparable and that the observed difference can be attributed to the variant, not to the luck of who ended up on each side.

A/B testing: how to design experiments you can trust

What an A/B test is not: it's not an opinion poll, it's not looking at two consecutive periods («before» and «after») and attributing the difference to the change, nor is it choosing the version we like best and hunting for numbers that confirm it. Without simultaneous, randomized groups, there is no A/B test — there is, at most, an interesting observation.

Start with a clear hypothesis

Before touching code or platforms, write the hypothesis in a single sentence. A good hypothesis links a concrete change to an expected effect on a concrete metric: for example, «showing the shipping cost earlier in the checkout will reduce cart abandonment». Notice that there's a change, an expected direction, and a measurable metric.

This step seems bureaucratic, but it's what prevents the most insidious trap: deciding what the test «proved» after seeing the results. If the hypothesis is written up front, the reading at the end is honest. Without it, it's easy to look at ten metrics, find one that went up by chance, and declare victory.

Choose the right metric — and a guardrail metric

The primary metric should reflect what really matters to you, not what's easy to measure. A flashier button may increase clicks (an easy metric) and at the same time lower purchases (the metric that matters). Choose one primary metric, ideally tied to business value, and resist the temptation to judge the test by everything that moved.

Alongside the primary metric, define one or two guardrail metrics: indicators that shouldn't get worse, even if the change improves the main goal. If you're optimizing conversion rate, margin per order or return rate can be useful guardrails. They stop you from celebrating a victory that, seen from a distance, is a loss.

Sample size and duration: the calculation almost everyone skips

Here's the most skipped and most decisive step. Before you start, you have to estimate how many users you need to detect a difference worth having. That calculation depends on three things: the base rate of the metric, the minimum detectable effect (the smallest improvement you'd care to discover), and the confidence level and statistical power you require.

The logic is intuitive: the smaller the improvement you want to distinguish from the noise, the more data you need. Tests with few users can only detect huge differences; for improvements of 1 or 2 percentage points, you need far more volume than intuition suggests. Defining this up front tells you how long the test has to run — and avoids the fatal question «can we stop yet?».

Statistical significance without mysticism

Statistical significance answers a modest question: if there were no difference at all between the variants, what would be the probability of observing a result like this, or more extreme, purely by chance? That probability is the p-value. A low p-value suggests that chance is an implausible explanation for what you saw; it doesn't prove the difference is large, nor that it's important.

It's worth separating three things that often get confused. Significance tells you whether the difference is distinguishable from noise. Magnitude (the effect size) tells you whether that difference is big enough to be worth it. And the confidence interval shows the margin of uncertainty around the estimate. A result can be statistically significant and still be too small to justify the change.

The most common mistakes in A/B testing

Most misleading tests fail for a handful of recurring reasons. Recognizing them is half the battle to avoid them:

  • Peeking and stopping early: looking at the results every day and stopping as soon as a favorable number appears dramatically inflates false positives. Set the duration up front and respect it.
  • Sample too small: concluding from few users is reading noise as if it were signal.
  • Testing everything at once: changing several things in a single variant makes it impossible to know what caused the effect.
  • Ignoring seasonality: a test that runs only on a Monday, or during a promotion, measures a world that isn't the normal one.
  • Novelty effect: a visible change grabs attention at first and the enthusiasm fades; tests that are too short confuse novelty with real improvement.

Mini case study: the button that looked better

Consider an online store that decided to make the buy button bigger and a brighter color. After three days, the click rate on the button had risen 12% and the team wanted to roll out the change immediately. Before that, they looked at the metric that mattered: completed purchases. Those hadn't moved — and the return rate was showing signs of rising.

By letting the test run the planned two weeks and looking at the guardrail metrics, they understood what was happening: the more aggressive button led more people to click on impulse, but not more people to actually want the product. The gain in clicks was real and, at the same time, irrelevant. They dropped the change. The right decision didn't come from a bigger number, but from having chosen well which number to look at.

Best practices for experiments you can trust

A few habits greatly increase the reliability of your tests. Run an A/A test now and then — two identical variants — to confirm that your tool doesn't find differences where none exist. Document each experiment: hypothesis, metric, sample size and result, to build memory instead of repeating mistakes. And resist turning every small decision into a test: experiments cost time and traffic, and should be saved for changes where the uncertainty is real and the bet is worth it.

Finally, accept that many tests will come back «no significant difference» — and that this is valuable information too. Knowing that a change doesn't move the needle spares you from implementing and maintaining it forever. A healthy experimentation program isn't the one that always wins; it's the one that learns reliably.

In practice

An A/B test is only worth as much as its design. Randomness makes the groups comparable, the hypothesis written up front keeps the reading honest, the sample calculation tells you when to stop, and the guardrail metrics prevent victories that are disguised defeats. None of these steps is hard; what's hard is the discipline of not skipping them when there's pressure to decide.

If you take one idea from this guide, let it be this: decide the rules before you see the results. It's that order — rules first, data second — that separates a serious experimentation culture from a collection of stories with numbers attached. Test fewer things, but test them well, and you'll come to trust what your data tells you.

← Back to insights
Let's talk?

Ready to transform your data?

Book a free 30-minute meeting and find out how we can help your team make better decisions.

Book a Free Meeting
bConcepts