Statistics·Glossary term

Posterior Distribution

Posterior Distribution A/B testing Reference guide

Posterior Distribution is a concept used in statistical tests & methods.

Quick definition: A posterior distribution is the Bayesian probability distribution for an unknown quantity after combining a prior with observed data under a likelihood model. It represents uncertainty conditional on those stated inputs.

What is Posterior distribution?

A posterior distribution is the Bayesian probability distribution for an unknown quantity after combining a prior with observed data under a likelihood model. It represents uncertainty conditional on those stated inputs. In experimentation, its value comes from matching the method to a predeclared estimand: the population, randomization unit, outcome, comparison, and time window that the product decision actually concerns. A named test cannot substitute for that design work.

Reliable analysis begins before the statistic is calculated. Define eligible users, stabilize treatment assignment, log exposure, preserve a consistent denominator, and wait for outcomes to mature. Check allocation and data quality; a sample ratio mismatch can undermine a randomized comparison even when a calculation is numerically correct.

How Posterior distribution works

Bayes’ theorem gives p(θ | y) = p(y | θ)p(θ) / p(y). The likelihood rewards parameter values that make the observed data plausible; the prior supplies pre-data information; the normalizing evidence p(y) makes the result integrate to one. In a beta-binomial conversion model, a Beta(a,b) prior becomes Beta(a+x,b+n−x) after x successes in n users. For complex models, posterior draws from simulation or Markov-chain Monte Carlo approximate the distribution.

The calculation should be reproducible from a frozen analysis dataset. Retain assignment, eligibility, exposure, outcome timestamps, exclusions, and aggregation rules. Do not change the analysis population after a result appears attractive. For a clear discussion of planned outcomes and decisions, see how to write an A/B-test hypothesis.

Assumptions and boundaries

Posterior probabilities are conditional, not unconditional facts. The likelihood must represent the outcome, analysis unit, clustering, missingness, and exposure process. Draws from a sampler also require convergence and effective-sample-size diagnostics. Posterior predictive checks compare simulated data from the fitted model with observed rates, tails, and variability. A narrow posterior from a misspecified model is false precision.

Assumptions should be examined against the experiment architecture rather than treated as a ceremonial checklist. Inspect group sizes, missingness, outcome distributions, dependence, and implementation changes. If the needed assumptions fail, revise the design or use a method that represents the data-generating process; do not simply choose the test that produces the smallest p-value.

Posterior distribution in A/B testing

For an A/B test, draw a conversion rate or treatment effect from each arm’s joint posterior and summarize the difference. The distribution can answer probability-of-benefit, probability of exceeding a practical lift, expected loss, and credible-interval questions. Predeclare the outcome window and business threshold. Checking a posterior every day does not absolve a team from defining a rollout, stop, or continue policy and accounting for immature outcomes.

Keep one primary outcome and distinguish secondary outcomes, diagnostics, and guardrails. A favorable result on one metric does not erase increased latency, refunds, or support burden. The discipline behind that separation is explained in primary and guardrail metrics. When several variants, metrics, or segments are compared, plan the comparison family and control the resulting false-positive risk as described in multiple comparisons in A/B testing.

Worked example and workflow

Control records 510 conversions among 10,000 eligible users and treatment records 545 among 10,000. With independent Beta(1,1) rate priors, the arm posteriors are Beta(511,9491) and Beta(546,9456). Paired random draws from these distributions form a posterior for treatment minus control. If its median is 0.35 percentage points but substantial draws remain below a 0.20-point practical threshold, the observed positive difference alone may not justify a broad rollout.

A practical workflow is: write the estimand and decision threshold; select the analysis unit and method; calculate sample size and a fixed or sequential monitoring plan; validate assignment and tracking; freeze the dataset after the outcome window; estimate effect size and uncertainty; review guardrails; and document the action and limits. Planning duration from baseline rate, variability, minimum detectable effect, power, and traffic prevents a test from being treated as an open-ended search; see how to calculate sample size.

Interpreting the result

Describe a posterior claim with its conditions: under the stated prior and likelihood, the probability that the parameter lies in an interval is a specified amount. Report arm-level data, the estimand, prior, model, interval, and decision-relevant tail probabilities. A posterior probability is not a probability that the code is correct, that the next launch will succeed, or that an untested segment shares the effect.

Use interval estimates to communicate what remains plausible. A confidence interval that crosses zero does not prove no effect, and a narrow interval around a tiny gain may not pay for rollout. Frequentist interval interpretation is often misunderstood; confidence intervals in A/B testing explains the distinction between procedure coverage and a probability statement about one fixed parameter.

Common pitfalls

  • Confusing posterior probability with a guarantee about future business performance.
  • Ignoring model diagnostics for a convenient conjugate calculation.
  • Reporting only a chance to win without defining a worthwhile win.
  • Selecting the best of many variants without modeling selection.
  • Changing the prior or outcome after inspecting results.

Also avoid peeking and stopping because a transient result is favorable. Fixed-horizon thresholds assume the stopping rule that was planned. If continuous monitoring is needed, use a validated sequential procedure with predeclared looks and boundaries. Otherwise, wait for the planned horizon and present the full analysis rather than a selected dashboard snapshot.

Decision workflow and reporting checklist

Start with the decision that the analysis will inform. State whether the team is choosing a default experience, deciding whether to invest in another iteration, or determining that the expected benefit is too uncertain to justify further traffic. Translate that action into a minimum useful effect and a maximum tolerable loss in original business units. A threshold is not a statistical convention: it should reflect expected reach, user impact, engineering cost, reversibility, and the availability of safer alternatives.

Before analysis, version the metric definition and preserve the raw ingredients needed to reproduce it. Confirm that each included unit was eligible before treatment, assigned only once according to the intended allocation, exposed as defined, and observed for the complete outcome window. Compare arm sizes and key pre-treatment diagnostics. If implementation, logging, or allocation differs by arm, report the issue and resolve it before interpreting an estimated effect. Excluding problematic records only from one arm can create a more serious bias than ordinary random noise.

After estimating the primary result, make the uncertainty visible. Present arm-level values, the absolute difference, a compatible interval or posterior distribution, and the exact decision rule. Explain how missing values, outliers, repeated measurements, clustering, and concurrent experiments were handled. Review prespecified guardrails on the same mature population, while keeping exploratory slices clearly labeled. If important conclusions depend on modeling choices, show sensitivity analyses rather than one preferred output.

Finally, separate evidence from action. A result may support a full rollout, a gradual reversible release, additional data, a redesign, or no action. Record the chosen action, assumptions, and follow-up monitoring so later teams can learn whether the experimental estimate generalized. This closes the experimentation loop without overstating what a single analysis can establish.

Frequently asked questions about Posterior distribution

What is the difference between a prior and posterior?

The prior is uncertainty before current data; the posterior is uncertainty after updating it with the likelihood.

Can I calculate a posterior without a closed-form formula?

Yes. Simulation and validated numerical methods are standard for realistic models.

Is a posterior interval a confidence interval?

No. They may look similar but their probability interpretations and assumptions differ.

Can the posterior be updated during a test?

Yes, but operational decisions should follow a predeclared, evaluated policy.

What makes a posterior trustworthy?

A defensible prior, appropriate likelihood, valid randomized data, and successful diagnostics.

Summary

Posterior distribution is useful when its estimand, mechanics, assumptions, and decision rule match the experiment. Treat the reported statistic as one part of an evidence package: absolute effect, uncertainty, data-quality checks, guardrails, practical value, and a transparent rollout policy. Sound randomization and measurement are more important than a sophisticated formula.

Sources