Skip to content
freeabtest.com

Statistical methodology

How every result is calculated

The methods behind each number on the results page, with the formulas and worked examples. The examples are computed by the same code the app runs.

At a glance

Which method produces which number

Every test, whether it runs in the browser or on your server, goes through the same calculations. No verdict is given until each version has 100 visitors.

  • Conversion rate

    Visitors who converted divided by visitors in the version

    Shown: Always

  • 95% interval for each rate

    Wilson score interval

    Shown: Always

  • Winner verdict

    Mixture sequential probability ratio test (mSPRT), 0.05 split across the variants

    Shown: Every version has 100 visitors

  • Chance to beat control

    Beta(1, 1) prior on each rate, normal approximation of the difference

    Shown: Both versions have 100 visitors

  • Lift and its interval

    Relative change; Newcombe hybrid score interval on the difference

    Shown: The control has a conversion

  • Sample ratio check

    Chi-square goodness of fit against the weights, flagged below p = 0.001

    Shown: 100 visitors in the test

  • Revenue per visitor

    Welch's t-test with a normal approximation

    Shown: Both versions have 30 visitors

  • Visitors needed

    Fixed-sample formula, 95% confidence and 80% power

    Shown: Test planner

The worked examples use one pricing page test: 4,800 visitors per version, 240 conversions on the control and 312 on the variant. Example numbers.

Rates and intervals

Conversion rate with a Wilson interval

A version's visitors are the unique visitors with at least one event in it. Its conversions are the unique visitors who completed the goal at least once. The conversion rate is conversions divided by visitors.

Each rate gets a 95% Wilson score interval. Unlike the simple normal interval, it stays inside 0% to 100% and keeps its coverage for small samples and rates near zero, which is where most conversion rates sit.

Wilson score interval, z = 1.96
p = x / n
center = (p + z²/2n) / (1 + z²/n)
margin = z / (1 + z²/n) × √( p(1 − p)/n + z²/4n² )
interval = center ± margin
Example data
Control, 240 / 4,800
5.0%
4.42% to 5.65%
Variant, 312 / 4,800
6.5%
5.84% to 7.23%
0%2%4%6%8%10%ControlVariant BVariant CExample data
Illustration. Separated intervals point to a real difference. Overlap does not prove there is none; the significance test decides.

Sequential significance

A verdict that stays valid however often you look

Each variant is compared with the control by a mixture sequential probability ratio test (mSPRT). Its p-value is always valid: checking every hour and stopping at the first significant result keeps the chance of a false winner at or below 5%.

mSPRT on the difference of two rates
d  = p₂ − p₁                (variant minus control)
p̄  = pooled rate of both versions
V  = max(p₁(1 − p₁), p̄(1 − p̄)) / n₁
   + max(p₂(1 − p₂), p̄(1 − p̄)) / n₂
τ  = max(0.002, 0.2 × p̄)
Λ  = √( V / (V + τ²) ) × exp( τ²d² / (2V(V + τ²)) )
p  = min(1, 1 / Λ)

Λ is the likelihood ratio of "there is a difference" against "there is none", averaged over a normal prior N(0, τ²) on the true difference. τ is the effect size the test is tuned for: 20% of the pooled rate, never below 0.002. Using the larger of each version's variance and the pooled variance keeps V above zero when a version has 0% or 100%.

A variant is significant when p is below 0.05 divided by the number of variants compared with the control (a Bonferroni split). With three variants the bar is 0.0167. The winner is the best-converting variant that is significant and above the control. The control is ahead only when every variant is significantly worse.

Example data
VisitorsVariantspBarVerdict
3,00010.2170.05Keep running
4,80010.0480.05Significant
4,80030.0480.0167Keep running

Same rates in every row: 5.0% against 6.5%. At 4,800 each, τ = 0.0115 from a pooled rate of 5.75%.

The price of looking freely

For the same observed lift, the sequential test needs about 2 to 3 times the visitors of a test you look at once. Visitors per version before the lift first clears 0.05:

BaselineLiftSingle lookSequential
2%20%10,15025,900
5%20%4,00010,100
5%30%1,9004,700
10%10%7,15019,150

Computed by stepping the visitor count in 50s with the observed rates held fixed.

Chance to beat control

How likely the variant is truly better

Each rate starts from a flat Beta(1, 1) prior, so the result reflects only your data. After x conversions from n visitors the rate follows Beta(1 + x, 1 + n − x). The chance to beat control is the probability that the variant's rate is higher, using a normal approximation to the difference of the two posteriors.

It is shown once both versions have 100 visitors. It moves quickly on small samples: in the early example it is already 99.4% while the sequential test says keep running. Decide on the significance verdict.

Chance to beat control
a = 1 + x,   b = 1 + n − x
mean = a / (a + b)
var  = ab / ((a + b)² (a + b + 1))
P = Φ( (mean_B − mean_A) / √(var_A + var_B) )
Example data
3,000 visitors each
99.4%
4,800 visitors each
>99.9%

Lift interval

How big the change is, with its range

Lift is the relative change against the control: (p₂ − p₁) / p₁. In live stats it comes with a 95% interval built with Newcombe's hybrid score method, which combines the two Wilson intervals into an interval on the difference and then divides it by the control rate.

It needs at least one conversion on the control. The interval tells you the plausible size of the effect; it does not replace the sequential verdict.

Newcombe hybrid score interval, relative to the control
[l₁, u₁], [l₂, u₂] = Wilson intervals of p₁, p₂
d = p₂ − p₁
lower = d − √( (p₂ − l₂)² + (u₁ − p₁)² )
upper = d + √( (u₂ − p₂)² + (p₁ − l₁)² )
lift interval = [lower / p₁, upper / p₁]
Example data

Worked example

+30%

95% interval +11% to +49%

Sample ratio check

A warning when visitors are not split as set

The visitors assigned to each active version are compared with the share its weight should give, using a chi-square goodness of fit test. The results page warns you when p is below 0.001 and the test has at least 100 visitors.

A mismatch this unlikely is almost always a fault: a redirect that drops visitors, a broken variation page, or the snippet missing on one page. Tests that use auto-shift skip the check, because they move the split on purpose.

Chi-square goodness of fit
Eᵢ = total visitors × weightᵢ / Σ weights
χ² = Σ (Oᵢ − Eᵢ)² / Eᵢ
degrees of freedom = versions − 1
warn when p < 0.001 and total ≥ 100
Example data
50/50 testχ²pResult
5,080 / 4,9202.560.110No warning
5,500 / 4,500100below 0.001Warning

Revenue

Revenue per visitor with Welch's test

Paid plans

Revenue per visitor divides a version's revenue by all of its visitors, buyers or not, so it rewards both more buyers and bigger orders. The best variant by revenue per visitor is compared with the control using Welch's t-test, which allows the two versions to have different spreads, with a normal approximation that is accurate at these sample sizes.

The verdict appears once both versions have 30 visitors. It uses a fixed 5% bar rather than the sequential test, so plan the sample size before you start and read revenue alongside the conversion verdict. A few large orders can move the average, so revenue needs more visitors than a conversion rate.

Welch's test, normal approximation
mean = revenue / visitors      (non-buyers count as 0)
s² = sample variance of revenue per visitor
z = |mean_B − mean_A| / √( s²_A/n_A + s²_B/n_B )
p = 2 × (1 − Φ(z)),  significant when p < 0.05
Example data

Control $3.10 per visitor (standard deviation $18), variant $3.60 ($20).

Visitors eachpVerdict
5,0000.189Not significant
20,0000.009Significant

Visitors needed

Planning a test's sample size

The test planner estimates visitors per version with the standard fixed-sample formula at 95% confidence and 80% power. With more than two versions it splits the 5% across the comparisons with the control, as the results do.

To detect a 20% lift on a 5% baseline you need 8,159 visitors per version for a single planned look. Plan for about 2 to 3 times that for the sequential test to call the same lift, or less if the real lift turns out bigger. Run for at least one full week either way.

Visitors per version
p₁ = baseline,  p₂ = baseline × (1 + lift)
δ = p₂ − p₁,   p̄ = (p₁ + p₂) / 2
n = 2 p̄(1 − p̄) (z₁₋α/₂ + z₁₋β)² / δ²
z₁₋α/₂ = 1.96 (α = 0.05),  z₁₋β = 0.84 (80% power)

The fixed-sample z-test

Why it does not pick the winner

A two-proportion z-test is valid only if you look once, at a sample size chosen in advance. Stopping the first time it dips below 0.05 pushes the real false winner rate far above 5%.

It is still calculated for the best variant and returned by the REST API as statistical_significance, for teams who plan a single look. The dashboard verdict always comes from the sequential test.

Example data

The early example: 3,000 visitors each, 5.0% against 6.5%.

z-test p
0.013
Looks significant
Sequential p
0.217
Keep running

If you had been checking daily, the z-test result would not hold up. The sequential one does.

Auto-shift

Moving traffic toward the leader

Growth and above

With auto-shift on, the split is recomputed about every hour once every active version has 100 visitors. Each version's chance of being the best is estimated by drawing from its Beta(1 + conversions, 1 + non-conversions) posterior (Thompson sampling), and new visitors are split in proportion. Every version keeps at least 10% of new visitors, or less with more than 5 versions, so each one keeps collecting data. Visitors already in the test keep their version.

Because the split moves, the sample ratio check is off for these tests. For the clearest answer to which version is better, keep a fixed split.

Reading a result

What each verdict means and what to do

  • Collecting data

    At least one version has fewer than 100 visitors. Wait.

  • Variant is outperforming the control

    The variant converts better and its sequential p-value is below the bar. Roll it out, ideally after at least one full week.

  • The control is outperforming every variant

    Every variant is significantly worse. Keep the control.

  • No significant difference yet

    The data cannot tell the versions apart. Keep running, or accept that the effect is too small to matter.

  • Pick the primary goal first. The winner is decided on it. Checking many goals raises the chance one looks significant by luck.
  • Run a full week. The sequential verdict holds whenever you stop, but weekday and weekend visitors often behave differently.
  • Inconclusive is a result. The change did not matter much. Ship the simpler version and test a bolder idea.

Segments split the 5% across every comparison in the view, so a segment is marked only when it clears that stricter bar. Treat a standout segment as a lead for a follow-up test.

Numerical details

How the distributions are computed

  • Normal distribution. Φ uses the Abramowitz and Stegun polynomial approximation (formula 26.2.17). Its inverse, used for z values such as 1.96, uses Acklam's rational approximation, with relative error below 1.2 × 10⁻⁹.
  • Chi-square p-values. From the regularized upper incomplete gamma function, with a series or continued fraction depending on the value, and the Lanczos approximation of the log-gamma function.
  • Beta draws for auto-shift. 4,000 draws per update from Gamma samples (Marsaglia and Tsang), with a seeded generator so an update can be reproduced.
  • Where to read more. The results guide explains each screen, experiment analytics shows the reports, and the REST API returns the results of each test.

Run a test and read it with confidence.

Free plan with 10,000 tested visitors a month and 1 running test. No card needed.

Start for free