Skip to content

A/B Testing Examples: Calculate Effects And Evaluate Controlled Experiments

July 12, 2026 ·
Two Randomized Groups With Different Observed Outcome Proportions

An A/B test compares two versions of a defined intervention under an experimental arrangement intended to reveal whether the change affects an important outcome. Random assignment helps distinguish the effect of the intervention from differences that arise because different kinds of people or cases receive different versions. A useful test needs more than a comparison of two percentages: it must establish the experimental unit, outcome, assignment mechanism, observation window and decision criteria. The original fictional examples below calculate absolute and relative effects, approximate uncertainty, sample allocation checks and operational guardrails. They demonstrate experimental reasoning rather than report actual results from a product or organization.

Quick Answer

Randomly assign eligible units to two versions, measure a predefined outcome, calculate the difference and its uncertainty, check data quality and guardrails, then make a proportionate decision.

Table Of Contents

Define The Question Before Assigning Versions

The research paper Trustworthy Analysis of Online A/B Tests describes the importance of appropriate randomization and statistical analysis in online controlled experiments. An A/B test compares a control arrangement with a treatment arrangement. In many applications, the treatment is a proposed feature or process modification and the control is the current arrangement.

Imagine a fictional community archive that provides a digital request form for reproductions of eligible historical material. Its team wants to improve the proportion of eligible visitors who complete an accurate request without requiring an avoidable clarification. The proposed treatment adds a concise explanation of the required information before submission. The control retains the existing form.

The primary outcome is not simply clicking the submit button. A successful outcome requires an eligible visitor to submit a request that satisfies the declared information condition within the observation window. This definition makes it possible to detect a treatment that encourages more submissions while producing incomplete or inaccurate requests.

Our operational definition examples explain why the unit, population, observation rule and timing boundary need to be established before collecting results. Our impact mapping examples show how a proposed deliverable can be connected to a desired behavior and meaningful goal.

Choose The Experimental Unit And Randomization Mechanism

Suppose the archive intends to randomize eligible visitors rather than page views. A visitor is assigned to either control or treatment when they first enter the eligible study population. During the defined experiment, repeated visits by that visitor should normally remain associated with the same assigned version under the chosen design.

If the service assigns a new version on every page view, one person may experience both forms. Their repeated observations may not be independent, and the treatment may influence their behavior on later visits to the control. Counting each page view as a separate experimental unit would not match a visitor-level randomization arrangement.

The experiment needs an appropriate assignment mechanism and reliable records of the assigned group. A random allocation is not the same as letting participants choose their preferred version. People who choose a more detailed form may have different needs from those who choose the original form. Comparing those self-selected groups can confuse the effect of the version with differences between the people using it.

Define the inclusion criteria before assignment where possible. If only participants who successfully reach a later stage are analyzed, the treatment itself may influence who enters that analyzed population. Preserve the intended randomized cohort and handle missing outcomes according to a suitable predeclared analysis policy.

Our customer journey mapping examples explain how interactions and outcomes can occur across several touchpoints. Consider whether the proposed experiment affects another channel or participant group, and investigate potential interference where the behavior of one assigned unit can affect another.

Worked Example: Calculate Absolute And Relative Improvement

Suppose 1,000 eligible visitors are assigned to the control and another 1,000 to the treatment. Assume every assigned visitor has the required observation status and the primary outcome is recorded once per visitor.

GroupEligible Assigned VisitorsSuccessful RequestsSuccess Proportion
Control1,00060060%
Treatment1,00065065%

The absolute difference is 65% minus 60%, or five percentage points. Relative to the control rate, the increase is 0.05 divided by 0.60, approximately 8.33%. The same observation can therefore be described as a five-percentage-point increase or an 8.33% relative increase. These are different numerical expressions of the result.

The observed difference corresponds to 50 additional successful outcomes per 1,000 assigned visitors if the control rate is used as the comparison baseline. This is an observed-group contrast under the experiment’s assumptions, not a guarantee that exactly 50 additional outcomes will occur in every future group.

The organization should consider practical significance. If a change produces a statistically distinguishable improvement but requires considerable new support work, its overall value may be limited. Conversely, a modest effect may matter when the intervention is easy to maintain and applies to a large eligible population. Define the improvement that would justify action before interpreting the results.

Worked Example: Calculate An Approximate Confidence Interval

The NIST reference for confidence intervals for a difference of proportions describes several statistical methods, including the ordinary normal-approximation interval. For this simplified example, assume the two randomized groups support the usual independent binary-outcome calculation.

The unpooled standard error for the observed difference is the square root of the control proportion times its complement divided by the control count, plus the treatment proportion times its complement divided by the treatment count. In this example, the variance estimate is 0.60 times 0.40 divided by 1,000 plus 0.65 times 0.35 divided by 1,000. That equals 0.0004675. Its square root is approximately 0.02162.

An illustrative two-sided 95% normal-approximation interval adds and subtracts 1.96 times the standard error from the observed difference. The margin is approximately 0.04238, giving an interval from 0.00762 to 0.09238, or about 0.76 to 9.24 percentage points.

CalculationApproximate Result
Observed Difference5.00 Percentage Points
Standard Error2.16 Percentage Points
95% Margin4.24 Percentage Points
Lower Endpoint0.76 Percentage Points
Upper Endpoint9.24 Percentage Points

Under the stated fixed-sample model and normal approximation, the interval excludes zero. The result is consistent with a positive treatment effect, but the interval also shows considerable uncertainty about its magnitude. A minimum worthwhile improvement of three percentage points is inside the interval, not below its lower endpoint. Therefore, the evidence does not establish with that interval procedure that the effect is at least three points.

The normal approximation is a teaching method rather than a universal recommendation. Other interval procedures may perform better, especially for small samples or uncommon outcomes. If the randomization design involves clusters, repeated observations or shared effects, use statistical methods suited to those conditions. Our work sampling examples discuss why the observation structure and independence assumptions influence an uncertainty calculation.

Distinguish Statistical Evidence From A Practical Decision

Suppose a larger experiment produces a very precise observed increase of half a percentage point. That could be distinguishable from zero under an appropriate statistical model while remaining too small to justify a complicated intervention. Conversely, an experiment with a promising five-point estimate and a wide interval might justify further investigation rather than immediate implementation.

A decision should consider the meaningful effect threshold, expected resource requirements, relevant risks and evidence about other outcomes. Our decision quality examples explain why a decision depends on a clear frame, alternatives, information and values. Statistical significance is one piece of evidence within that wider arrangement.

Do not describe an interval containing zero as proof that the two versions have identical effects. It may reflect inadequate precision or an effect that is difficult to distinguish under the chosen design. An equivalence or noninferiority question requires an appropriate design and predefined margin; it cannot be established merely by failing to reject an ordinary equality hypothesis.

Worked Example: Examine A Guardrail Measure

The archive’s primary success measure improves from 60% to 65% in the fictional experiment. However, the team also tracks an important guardrail: the proportion of assigned visitors whose submitted request is associated with an incorrect identification of the relevant material. The control group contains 12 such visitors, while the treatment group contains 24.

MeasureControlTreatment
Successful Request Share60%65%
Incorrect Identification Share1.2%2.4%

The observed guardrail rate increases by 1.2 percentage points and doubles relative to its control value. These descriptive figures do not themselves establish a statistically reliable harmful effect. The event counts are small, and a suitable analysis is needed. Nevertheless, the guardrail’s practical importance may justify investigation before the treatment is released more widely.

The treatment might encourage more visitors to submit a request while misunderstanding which material they have selected. If that mechanism is established, the team needs to revise the explanation or interface instead of celebrate the primary improvement alone. Our first pass yield examples illustrate why accepted results and corrective work should remain distinguishable.

Specify guardrails before the experiment where possible. Include the actual quality, access and other consequential conditions relevant to the intervention. A favorable primary outcome does not compensate automatically for a violation of a mandatory requirement.

Worked Example: Investigate Sample Ratio Mismatch

The Microsoft Research paper Diagnosing Sample Ratio Mismatch in Online Controlled Experiments examines the problem of observed assignment proportions differing from the intended allocation. Such a mismatch can indicate problems in assignment, logging, eligibility or analysis.

Suppose a different fictional experiment is designed for a 50:50 allocation and records 600 eligible assigned units in control and 400 in treatment. Under the simple model of 1,000 independent assignments with equal probabilities, the expected count in each group is 500. The ordinary chi-square goodness-of-fit statistic is the sum of each squared observed-minus-expected difference divided by its expected count.

The control contribution is 100 squared divided by 500, or 20. The treatment contribution is also 20. The total is 40 with one degree of freedom under the stated model. This is a large departure from the intended split and warrants investigation.

A mismatch does not establish its own cause. The team should check whether the assignment rule actually changed, whether one group’s events are missing, whether a filter was applied after assignment or whether records are duplicated. Reweighting the two reported outcome percentages does not necessarily repair an experiment whose observation mechanism is unreliable.

Our process mining examples explain why recorded event sequences and missing events need careful interpretation. Before evaluating treatment effects, establish that the actual randomized population and outcome records can support the intended analysis.

Plan The Sample Size And Observation Window

A useful experiment has an advance plan for the smallest effect worth detecting, the desired statistical precision or power, the expected control rate and the allocation arrangement. The appropriate sample-size method depends on the intended analysis. Do not choose a number solely because another experiment used it successfully.

For an illustrative precision calculation, suppose the team wants an approximate 95% margin of no more than two percentage points for the difference between two independent proportions, with equal group sizes and a conservative variance assumption of 0.25 for each group. The variance of the difference is then approximately 0.5 divided by the count per group.

Set 1.96 times the square root of 0.5 divided by the group count equal to 0.02. Squaring and rearranging gives a required group count of 1.96 squared times 0.5 divided by 0.02 squared, or 4,802. This calculation concerns an approximate interval margin, not a hypothesis-test power calculation. An actual planning method may need to account for different baseline assumptions, missing outcomes, clustering and the selected test.

The duration of an experiment also matters. If participants need several days to complete the intended request, the observation window must allow the relevant outcome to become observable. Ending an experiment after enough people have been assigned but before their outcomes can mature could produce incomplete or biased results.

Avoid repeatedly checking an ordinary fixed-sample significance rule and ending the test as soon as it becomes favorable. Such a stopping policy can change its error properties. Use an appropriate sequential design when early stopping is part of the plan, and document the actual decision rule.

Consider a separate experiment in which 1,000 participants enter each arm, 600 control participants complete the intended action, and 630 treatment participants have documented completions. Assume that the outcome status of 40 treatment participants cannot be recovered and that the control records are complete. Coding every missing treatment outcome as a failure yields a treatment conversion rate of 63%. Coding every missing outcome as a success yields 67%. The corresponding absolute lift spans three to seven percentage points before sampling uncertainty is considered.

This calculation is a missing-outcome sensitivity bound, not a confidence interval. It shows how a specific data defect changes the range of plausible observed effects. Investigate whether missing records cluster around a browser version, connection type, location, assignment time, or application error. If the change itself disrupts recording, excluding the affected visitors can hide an important cost of deployment. Retain assignment counts, compare missingness by group, disclose the assumptions behind any imputation, and establish a conservative decision rule before examining the results. A commercially attractive lift should never compensate for an unreliable measurement pipeline.

Reusable A/B Testing Worksheet

FieldRecord
QuestionIntended Improvement And Actual Outcome
VersionsControl And Treatment Arrangements
PopulationEligible Units And Randomization Boundary
AssignmentMechanism, Allocation And Exposure Records
MeasuresPrimary Outcome And Consequential Guardrails
PlanSample Size, Duration And Analysis Rules
ResultsCounts, Absolute And Relative Difference, Uncertainty
ChecksAllocation, Missingness, Interference And Data Quality
DecisionPractical Effect, Risks, Follow-Up And Verification

A credible experiment allows the reader to trace the observed results back to the intended randomization arrangement and the actual outcome definition. Keep the analysis appropriate to the study design, preserve unfavorable and unresolved evidence, and distinguish a promising result from a justified deployment decision. The value of A/B testing is learning which changes support meaningful outcomes under relevant conditions, not merely finding a version with a higher percentage.

Frequently Asked Questions

What is an A/B test?

A controlled comparison of two versions using an appropriate assignment and analysis arrangement.

What is the control group?

The group assigned to the reference arrangement against which the treatment is compared.

Why randomize participants?

Random assignment helps support a fair comparison of the interventions under the study design.

How is absolute lift calculated?

Subtract the control proportion from the treatment proportion.

How is relative lift calculated?

Divide the absolute difference by the control proportion when that denominator is meaningful.

What is a guardrail metric?

A consequential outcome or requirement that should be monitored alongside the primary measure.

What is sample ratio mismatch?

An observed allocation inconsistent with the intended assignment proportions.

Does statistical significance guarantee a useful effect?

The practical magnitude, uncertainty, costs and other consequences still matter.

Can a test end as soon as the result is favorable?

Use a stopping procedure appropriate to the statistical design.

How should a result be verified?

Review assignment, outcome records, analysis assumptions and actual consequences before deciding on deployment.

Leave a Reply

Your email address will not be published. Required fields are marked *