"We launched a test, after three days variant B showed +12% conversion, so we rolled it out to everyone" — and a month later the metric was back where it started. Sound familiar? Usually the idea isn't to blame; the statistics are. The test was stopped too early, the sample was too small, or the difference was random noise that's easy to mistake for a win.

This article covers how we at Mosmox plan A/B tests in mobile apps: how to calculate the number of users you need, how long a test should run, how mobile experiments differ from web ones, and which traps most often turn a "win" into an illusion.

Start with a hypothesis and one primary metric

A well-formed test reads like this: "If we show the paywall after the third saved entry instead of on first launch, trial starts among new users will increase, because people will already have felt the product's value." That sentence contains a change, an audience, a metric and a mechanism.

Before launch we write down:

  • The primary metric (just one!) that drives the decision.
  • Guardrail metrics that must not get worse: crash-free rate, week-one retention, refunds, cancellations.
  • The minimum detectable effect (MDE) — the smallest improvement worth shipping.
  • Duration and sample size, calculated in advance.
  • The decision rule: what we do with a positive, negative or neutral result.

If none of this is written down before the start, there will almost always be some metric that "went up" afterwards — and the decision gets made on that.

Sample size: calculate it before launch

For conversion metrics (the share of users who take an action) there's a handy approximation known as Lehr's rule: at a 5% significance level and 80% power, each group needs roughly

n ≈ 16 × p × (1 − p) / δ²

where p is the current conversion rate and δ is the absolute difference you want to detect. For precise numbers use a calculator such as Evan Miller's, but the rule gets the order of magnitude right.

Baseline conversionRelative effect (MDE)Absolute differenceUsers per group
2%+10%0.2 pp≈ 78,400
4%+10%0.4 pp≈ 38,400
4%+20%0.8 pp≈ 9,600
20%+5%1 pp≈ 25,600
20%+10%2 pp≈ 6,400

The key practical takeaway: small effects on rare events require enormous samples. If your app gets 1,000 new users a day, a "+10% on a 4% conversion" test will take about 77 days. There are only three honest options: test bolder changes with a bigger expected effect, pick a more frequent metric closer to the change (say, reaching the paywall screen rather than paying), or skip the test and decide using qualitative methods.

Duration: at least one full week

Even if you hit the required sample in three days, a test should run for at least 7 days, ideally 14. Why:

  • Weekly seasonality. Users behave differently on Monday and Saturday; a test that only covered weekdays doesn't represent a week.
  • Novelty effect. Any visible UI change draws attention at first; a week later the effect may be gone.
  • Delayed conversions. If the trial lasts 7 days and the metric is payment after the trial, the test can't end before the last participants have completed that journey.

The duration formula is simple: total required sample across groups, divided by new experiment participants per day, rounded up to whole weeks.

Mobile specifics that web playbooks ignore

App versions

If variant B needs new code, only users on the new version can take part. They aren't representative: more active users update first. We target the experiment at a minimum version for both groups — control and treatment must come from the same version.

Assignment versus exposure

Users are assigned to a group when they first receive the configuration, but only those who reach the relevant screen actually see the change. Analyse exposed users, and log the exposure event identically in both groups — otherwise you're comparing different audiences.

Config caching and offline use

Configuration arrives late, and the first session may run on default values. For onboarding tests that's critical: we wait for the config on the splash screen with a 1–2 second cap, or defer the test to the second session.

User identity

One person on a phone and a tablet, or after a reinstall, can land in different groups. If you have sign-in, assign by account ID.

Statistical traps

TrapWhat happensHow to avoid it
PeekingResults are checked daily and the test stops as soon as p < 0.05. The false-positive rate multipliesA fixed duration, or sequential testing methods designed for interim looks
Multiple comparisons20 metrics, 4 variants, 10 segments — something will look "significant" by chanceOne primary metric; multiplicity corrections; segments only as hypotheses for future tests
Sample ratio mismatchThe split is 50/50, but the groups are 52/48 — a sign of an assignment or logging bugA chi-square check before analysis; with a clear imbalance, discard the result
Underpowered testThe test "showed nothing" because the sample could never detect a realistic effectCalculate sample size upfront; "no significant difference" ≠ "no difference"
Revenue outliersA few large purchases decide an ARPU testCap extreme values, run longer, report median and conversion metrics alongside the mean
Novelty effectA spike in the first days, then a return to baselineAt least 2 weeks; compare the effect week by week

Evan Miller covers peeking in detail in How Not To Run an A/B Test, and the definitive treatment of experiment trustworthiness is the book by Ron Kohavi, Diane Tang and Ya Xu, Trustworthy Online Controlled Experiments.

Tools and process

For most mobile projects we start with Firebase A/B Testing: it runs on top of Remote Config and Analytics, needs no extra infrastructure and suits UI and onboarding tests. Once experiments multiply or you need your own statistical model, we move to dedicated platforms (Statsig, Amplitude Experiment, GrowthBook) or analyse exported data in a warehouse.

The lifecycle of one test on our projects:

  1. Hypothesis, metrics, MDE and decision rule in a short document.
  2. Sample size and duration calculated; if the test would run longer than 6–8 weeks, we rethink the design.
  3. Variants implemented behind a flag; both branches verified on test devices.
  4. An A/A check, or at least verification of exposure events on a small share of traffic for 1–2 days.
  5. Launch, with daily monitoring of guardrails and SRM only — no decisions on the primary metric.
  6. Analysis after the planned end date; decision by the pre-registered rule.
  7. Result logged in the experiment journal, neutral and negative tests included.

Common mistakes

  1. Testing for the sake of it. Testing a button colour in an app with 300 users a day. No duration will ever produce a result.
  2. Changing conditions mid-test. Adjusting the traffic split, fixing a bug in one variant, adding a new audience — data before and after can no longer be pooled.
  3. Several tests on one screen. Uncontrolled overlap between experiments makes the results unusable.
  4. Deciding on a segment. "No difference overall, but +30% on iPad in Germany" is a hypothesis for a new test, not a result.
  5. No journal. Six months later the team re-runs a test that already failed.

Pre-launch checklist

  • The hypothesis states the change, audience, metric and mechanism.
  • One primary metric and 2–4 guardrails.
  • Sample size and duration calculated; duration in whole weeks, at least 7 days.
  • Both groups are on the same app version; the exposure event is logged identically.
  • Assignment uses a stable identifier (the account, if available).
  • An SRM check is planned.
  • The decision rule is written down before launch.
  • No overlap with other tests on the same screens.
  • The result goes into the experiment journal whatever the outcome.

Sources: Kohavi, Tang, Xu — Trustworthy Online Controlled Experiments; Evan Miller — How Not To Run an A/B Test; Evan Miller — Sample Size Calculator; Firebase A/B Testing; Firebase Remote Config.