What is Bayesian Statistics?

Bayesian statistics is an approach to statistical inference that uses Bayes' theorem to update the probability of a hypothesis or parameter value as new data arrive. It combines a prior distribution, which encodes existing knowledge, with the likelihood of the observed data to produce a posterior distribution that quantifies both the estimate and its uncertainty.

How Bayesian statistics works

Bayesian inference follows three steps: state what you already know (the prior), observe data (the evidence), and update your beliefs (the posterior). The update follows Bayes' theorem (Gelman et al., 2013):

P(A|D) = P(D|A) × P(A) / P(D)

Where:

  • A is the event or quantity of interest, and D is the data or evidence
  • P(A|D) = posterior probability (updated belief after seeing the data)
  • P(D|A) = likelihood (probability of the data given A)
  • P(A) = prior probability (belief before seeing the data)
  • P(D) = marginal probability of the data (a normalizing constant)

Worked example

A marketing manager launches a new email campaign. Based on similar campaigns, they expect a conversion rate between 5% and 15%. This is the prior.

After one day, 40 out of 2 000 recipients have converted, a 2% conversion rate. This is the evidence.

  • Prior: conversion rate of 5%–15%
  • Evidence: observed 2% conversion rate
  • Posterior: an updated distribution that weighs the prior against the data

With this little data and a fairly confident prior, the posterior estimate lies between the observed 2% and the prior range. As more recipients are observed, the data dominate and the posterior moves toward the observed rate. A purely frequentist analysis would report the observed 2% rate with a confidence interval, without formally using the prior experience from similar campaigns.

Key components of Bayesian analysis

Prior distribution

The prior represents knowledge about a parameter before the new data are seen, for example the plausible range of a channel's incremental ROAS (iROAS) based on earlier models, benchmarks or experiments.

Likelihood function

The likelihood describes how probable the observed data are under different parameter values. In an MMM, it links media spend, controls and the model parameters to observed sales.

Posterior distribution

The posterior combines the prior and the likelihood. It gives a full distribution for each parameter, from which point estimates and credible intervals are derived. In practice, posteriors for complex models are computed with Markov chain Monte Carlo (MCMC) or related sampling methods (Gelman et al., 2013).

The chart below illustrates how the prior and posterior distributions could look for the iROAS of a channel.

Prior and posterior distribution in Bayesian statistics

Bayesian statistics in marketing mix modeling

Bayesian methods are widely used to estimate marketing mix models (MMM). Jin et al. (2017) describe a Bayesian MMM that estimates carryover and shape effects and show that priors have a large impact on the results when the sample is small. In practice, a Bayesian MMM:

  • Uses prior knowledge about media effectiveness, adstock and saturation, which stabilizes estimates when data are limited.
  • Combines evidence from experiments: lift and geo test results can be expressed as priors, a process called calibration. See MMM calibration.
  • Quantifies uncertainty in every estimate, so budget decisions can account for how confident the model is in each channel's iROAS.
  • Supports hierarchical modeling across markets, channels or products.

The flip side is that priors influence the results, so they must be documented and checked. A prior that is too narrow can override the data.

Bayesian A/B testing and experimentation

Bayesian analysis of experiments can:

  • Express results as intuitive probability statements, such as "the probability that variant B is better than A".
  • Incorporate prior beliefs about plausible effect sizes.
  • Support monitoring of results while a test runs. Stopping early based on interim results still affects the reliability of conclusions, so stopping rules should be set in advance.

Common Bayesian methods in marketing

  • Bayesian regression: the core of most Bayesian MMMs, with uncertainty built into every coefficient.
  • Bayesian time series models: used to model trend and seasonality and to forecast, for example in counterfactual analysis of geo tests.
  • Hierarchical models: share information across markets, segments or product lines while allowing differences (Gelman et al., 2013).
  • Probabilistic customer models: used, for example, to estimate predicted lifetime value from transaction histories.

Practical considerations

  • Prior selection: use priors that are informative but not overly restrictive, and test how sensitive the results are to them.
  • Convergence: check MCMC diagnostics before interpreting results.
  • Computation: large models can be slow to sample.
  • Validation: combine technical validation (out-of-sample fit, posterior predictive checks) with business validation against experiments and domain knowledge.
  • Communication: report credible intervals alongside point estimates and document all assumptions.

Bayesian vs. frequentist statistics

Aspect Bayesian Frequentist
Probability interpretation Degree of belief Long-run frequency
Parameters Random variables Fixed but unknown
Prior knowledge Incorporated explicitly Not formally part of the model
Results Probability distributions Point estimates and p-values
Uncertainty Credible intervals Confidence intervals

Tools and software

  • PyMC: an open-source Python library for probabilistic programming, developed and maintained by the PyMC developer community and fiscally sponsored by NumFOCUS (Abril-Pla et al., 2023). PyMC Labs is a separate consultancy formed by members of the PyMC core team.
  • Stan: a probabilistic programming language for Bayesian inference, developed by an academic-led open-source team.
  • Pyro: a probabilistic programming library built on PyTorch, originally developed at Uber AI Labs.
  • TensorFlow Probability: a Python library for probabilistic modeling built on TensorFlow.

Open-source MMM frameworks built on these libraries include Google's Meridian and PyMC-Marketing. For a comparison of an open-source framework with a managed platform, see Meridian vs. Sellforte. For an example of a Bayesian marketing mix modeling platform, see the Sellforte demo.

Key takeaways

  • Bayesian statistics updates a prior with data to produce a posterior distribution, not just a point estimate.
  • In MMM, priors make it possible to stabilize estimates and to calibrate the model with experiment results.
  • Priors also shape the results, so they must be transparent, documented and tested for sensitivity.

Related terms

Further reading on Sellforte

References

  1. Gelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A., & Rubin, D. B. (2013). Bayesian data analysis (3rd ed.). CRC Press. https://www.oreilly.com/library/view/-/9781439898222/
  2. Jin, Y., Wang, Y., Sun, Y., Chan, D., & Koehler, J. (2017). Bayesian methods for media mix modeling with carryover and shape effects. Google Inc. https://research.google/pubs/pub46001/
  3. Abril-Pla, O., Andreani, V., Carroll, C., Dong, L., Fonnesbeck, C. J., Kochurov, M., Kumar, R., Lao, J., Luhmann, C. C., Martin, O. A., Osthege, M., Vieira, R., Wiecki, T., & Zinkov, R. (2023). PyMC: A modern, and comprehensive probabilistic programming framework in Python. PeerJ Computer Science, 9, e1516. https://doi.org/10.7717/peerj-cs.1516
  4. Google. (n.d.). Meridian [Developer documentation]. Retrieved October 30, 2026, from https://developers.google.com/meridian
  5. PyMC Labs and contributors. (n.d.). PyMC-Marketing [Software documentation]. Retrieved October 30, 2026, from https://www.pymc-marketing.io/

Authors

Paavo

Dr. Paavo Niskala is a Principal Engineer at Sellforte. With PhD in the field of computational plasma physics, he has over 10 years of experience in designing and building complex data-intensive systems. Paavo has especially focused on using data science in critical business applications, such as Marketing Mix Modeling, which helps businesses make better marketing decisions. Follow Paavo in LinkedIn.