Working example 03 Bayesian A/B/n testing

Uncertain impact

“We invest in interventions, but do not know which ones actually work.”

A subscription business spends on discounts, proactive calls and loyalty emails to keep customers. Each looks effective in isolation; none has been tested against doing nothing.

The business context

The problem and the solution

The business problem

A subscription business wants to keep customers, but discounts, calls and emails all cost money. A campaign can seem successful because some customers would have stayed anyway. The business needs to know which action earns more than it costs.

How the solution helps

The solution compares randomly assigned groups receiving each action with a group receiving no action. It estimates extra customers retained, allows for uncertainty in the results and deducts the cost of each action. This helps decide whether to act or collect more evidence, rather than simply choosing the highest observed retention rate.

Explore the evidence

The input dataset

One synthetic row per test group per observed week, with 200 customers per group each week. Only the weeks selected below are included. Generating a new experiment replaces the outcomes. The value of retaining a customer is an assumption set below. The true probabilities used to generate the demo are not inputs to the analysis.

All records are illustrative and generated in your browser. Browse every row using the table controls. Displayed decimals are rounded; calculations use full precision.

How it works

The method in three steps

  1. RandomiseEach week, 200 at-risk customers per arm receive a discount, a call, an email or nothing.arm ∈ {control, discount, call, email}
  2. Update beliefsRetention in each arm has a Beta posterior that sharpens as evidence accumulates.θ | data ~ Beta(1 + retained, 1 + lost)
  3. Decide on value20,000 posterior draws give the probability each option has the highest net value after its cost, and the expected regret of choosing it now.net = 1,000 × ((θ_arm − θ_control) × value − cost)

Try it

The working example

Experiment settings

Let the experiment run longer, or change what a retained customer is worth.

Customers in the test–
Best-value option–
Expected regret–Per 1,000 customers if we choose it now
Decision–

What we believe about each retention rate

Posterior distributions. Narrow, separated curves mean clear differences.

Net value after cost

Expected net value per 1,000 customers treated, with 95% credible intervals.

Results by intervention

InterventionRetainedRateUplift (95% interval)P(beats control)P(best value)Verdict

Interpretation

From example to engagement

What the example shows

The intervention with the highest retention rate is not always the one to fund: its cost can outweigh the extra customers kept. Some interventions are indistinguishable from doing nothing. Expected regret gives a principled stopping rule instead of waiting for an arbitrary significance threshold.

When an experiment is not possible

  • Difference-in-differences or synthetic controls using regions or periods that did not receive the intervention.
  • Propensity-score matching or inverse weighting on rich customer data.
  • Each relies on assumptions we would state and test explicitly.