Bayesian Monte Carlo Simulation — Prior-informed stochastic sampling for uncertainty quantification

Simulation
Introduced by
O'Hagan, A. and colleagues
Year
1987–1990s
Type
Simulation / uncertainty quantification
Family
Simulation / optimization

What does it do?

Bayesian Monte Carlo Simulation propagates uncertainty through a model by first forming a posterior distribution over its uncertain inputs.

The posterior combines a prior distribution with a likelihood for observed data via Bayes' theorem, and the method then samples from that posterior. Each posterior draw is passed through the model, so the spread of the outputs reflects both prior knowledge and data. Standard Monte Carlo, by contrast, samples from input distributions that are fixed by assumption.

The intuition behind the method

Standard Monte Carlo draws inputs from distributions the analyst specifies and treats as known. In practice those distributions are themselves uncertain, and that uncertainty is often absent from the simulation. Bayesian Monte Carlo updates the input distributions instead: prior beliefs are combined with observed evidence to give a posterior over parameters, and the simulation draws from that posterior. When prior information is strong and data are few, the prior shapes the output substantially, which is why the prior must be stated and examined rather than hidden.

History

Monte Carlo integration was brought to the attention of the Bayesian statistics community by Kloek and van Dijk (1978), as noted in O'Hagan's 1987 paper, which also cites earlier use by Stewart. O'Hagan's 1987 paper, 'Monte Carlo is fundamentally unsound', presents objections to Monte Carlo integration for Bayesian posterior computation. It is a critique of that approach, not a description of a Bayesian simulation procedure, so it should not be read as the origin of Bayesian Monte Carlo. No single originator of the method is established. It developed from the combination of Bayesian inference with Monte Carlo computation, and was later made practical by posterior-sampling algorithms such as Metropolis-Hastings and Gibbs sampling.

When to use it

Choose Bayesian Monte Carlo when credible prior information exists, such as expert knowledge, earlier studies or physical constraints, and that information should formally shape the simulation. It suits small-data problems, where standard Monte Carlo that samples inputs from fixed, assumed distributions can give wide and weakly informed output distributions when the inputs are poorly constrained. It also fits decisions that need probabilistic statements about outcomes, such as the probability that a cost exceeds a given value. Avoid it when no defensible prior can be stated, because the Bayesian step then adds little beyond an arbitrary input model. Also avoid it when the computing budget is very small, since posterior sampling costs more than direct Monte Carlo, or when stakeholders will not accept prior elicitation as part of the analysis.

Limitations and considerations

  • The prior is a subjective input. Different analysts can specify different priors and obtain different output distributions, so the prior must be reported and justified.
  • Non-conjugate posteriors require MCMC or variational approximations, which add computing cost and approximation error.
  • MCMC output is valid only when chains have converged and mixed. Poor mixing on a multimodal posterior can give misleading intervals.
  • Sampling efficiency declines as the number of uncertain parameters grows, so high-dimensional problems need more specialised algorithms.
  • With sparse data, output summaries can depend strongly on the prior, so a prior sensitivity analysis is needed.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Prior information enters the output formally: when relevant prior knowledge exists and data are limited, the posterior samples and the resulting output intervals are more constrained than data alone would allow.
  • Each posterior draw is run through the model, so parameter uncertainty propagates into the output distribution without a separate sensitivity step.
  • Threshold probabilities such as P(cost > X) are read directly as the share of output samples above X, with no further modelling.
  • Updating is coherent: when new data arrive, the current posterior can serve as the prior for the next analysis.
  • Informative priors help stabilise estimates when the sample is small.

Applications

  • Cost-effectiveness analysis in health technology assessment, where uncertain model parameters propagate into probability statements about cost-effectiveness (illustrative).
  • Reliability analysis of engineering structures, where uncertain material and load parameters are propagated through a structural model (illustrative).
  • Environmental exposure assessment when monitoring data are limited and expert knowledge informs the prior (illustrative).
  • Clinical trial analysis, where posterior probabilities of treatment benefit inform interim decisions (illustrative).

How it works

How it works

1

Specify a prior distribution p(theta) for each uncertain parameter, based on expert judgement, earlier studies or physical constraints. Distribution families such as Normal, Beta, Gamma or Dirichlet are chosen to match the plausible range and shape of each parameter.

Formula
\theta \sim p(\theta)
2

Specify the likelihood p(y | theta), which gives the probability of the observed data y for a given parameter value theta. The choice encodes the data-generating process, for example a Gaussian observation model or a Poisson count model, and links the parameters to the measurements.

Formula
y \sim p(y \mid \theta)
3

Combine prior and likelihood with Bayes' theorem, p(theta | y) proportional to p(y | theta) times p(theta). The posterior favours parameter values that are plausible under the prior and consistent with the data. When the posterior has no closed form, it must be approximated before sampling.

Formula
p(\theta | y) \propto p(y | \theta)\, p(\theta)
4

Draw N samples theta^(k) from the posterior. Direct sampling is possible when the posterior is tractable, for example for conjugate models; otherwise MCMC, importance sampling or Sequential Monte Carlo is used. The chain or sample must be checked for convergence before its draws are treated as posterior samples.

Formula
\theta^{(k)} \sim p(\theta | y), \quad k = 1, \ldots, N
5

Pass each posterior sample through the model to obtain f(theta^(k)). The formula gives the posterior mean of f as the average over the N samples. Credible intervals and threshold-exceedance probabilities are read from the same output values, as sample quantiles and sample proportions.

Formula
\hat{\mu} = \frac{1}{N} \sum_{k=1}^{N} f(\theta^{(k)})

Common pitfalls

  • Describing a flat or weakly informative prior as objective. Every prior encodes assumptions, and a flat prior can yield an improper posterior in some models.
  • Using raw MCMC draws without checking convergence diagnostics such as R-hat and trace plots.
  • Reporting prior summaries as if they were posterior results.
  • Assuming a misspecified likelihood is harmless. If the observation model does not match the data-generating process, the posterior is biased whatever the prior.
  • Reading a credible interval as a frequentist confidence interval. A credible interval is a probability statement about the parameter, given the prior and the data.

Frequently asked questions

How does Bayesian Monte Carlo differ from standard Monte Carlo simulation?

Standard Monte Carlo samples from assumed input distributions that are not updated by data. Bayesian Monte Carlo first forms a posterior by combining prior beliefs with observed data through Bayes' theorem, then samples from that posterior. The sampling distributions therefore reflect the evidence as well as the analyst's assumptions.

Do I need MCMC to run Bayesian Monte Carlo?

Not always. When the posterior is conjugate (e.g., Beta-Binomial, Normal-Normal models), direct sampling is possible. For complex, non-conjugate posteriors, MCMC (Metropolis-Hastings, Gibbs, HMC) or variational inference approximations are needed. Software such as Stan, PyMC, or JAGS automates this step.

How many samples N are typically needed?

Posterior convergence and Monte Carlo error both affect the required N. For MCMC, thousands to tens of thousands of post-warmup samples are common. For direct sampling from tractable posteriors, N in the range 1,000–10,000 usually suffices for stable mean and credible-interval estimates.

What if I have no prior information and want to remain objective?

Use a weakly informative or reference prior (e.g., Jeffreys prior). With a large dataset, the posterior is dominated by the likelihood and the result converges toward the frequentist maximum-likelihood estimate. However, no prior is truly non-informative; all priors encode at least implicit constraints.

Is Bayesian Monte Carlo the same as Bayesian model averaging?

No, though they are related. Bayesian model averaging explicitly mixes predictions from multiple competing models, weighted by their posterior probabilities. Bayesian Monte Carlo typically refers to posterior-based sampling within a single model to propagate parameter uncertainty. Bayesian model averaging can be implemented using Bayesian Monte Carlo as a computational engine.

Related methods

Sources

  1. O'Hagan, A., Buck, C. E., Daneshkhah, A., Eiser, J. R., Garthwaite, P. H., Jenkinson, D. J., Oakley, J. E., & Rakow, T. (2006). Uncertain Judgements: Eliciting Experts' Probabilities. Wiley.

    ISBN: 9780470029992
  2. O'Hagan, A. (1987). Monte Carlo is fundamentally unsound. The Statistician, 36(2-3), 247-249.

    Open DOI reference