Skip to main content icon/video/no-internet

Nested sampling is a computational method for both generating samples from a posterior probability distribution and calculating the Bayesian evidence. The approach was invented by John Skilling in 2004 primarily for computing Bayesian evidence values, but nested sampling is now also widely used for parameter estimation from samples. Parameter estimation with nested sampling often performs well compared to alternative methods like Markov chain Monte Carlo for posterior distributions with multiple local maxima. Popular nested sampling software packages include MultiNest, PolyChord, and dynesty.

Background

Applications of Bayesian statistics in research can generally be divided into model selection and parameter estimation. Model selection involves working out which model of the data is most likely to be correct. This can be done by comparing the Bayesian evidence values for each model, given the data and any prior knowledge. Parameter estimation involves inferring the likely parameter values for a specific model, given the data. This is typically done by generating samples from the posterior distribution of parameters’ values, then assessing the samples’ properties.

Given a model and some data, both the posterior distribution of parameter values and the Bayesian evidence can be calculated using Bayes’s theorem. For practical data sets and research applications, this must in general be done computationally, and nested sampling is one possible method.

The next section provides an overview of the procedure nested sampling uses to produce posterior samples. This is followed by a discussion of calculation uncertainties and of software packages that can be used to implement nested sampling in practice.

The Nested Sampling Algorithm

The algorithm begins by sampling some number of points randomly from the prior. It then iterates by, at each step, removing the point with the lowest likelihood and replacing it with a new live point sampled randomly from the region of the prior with a higher likelihood than the removed point. Iterating in this way until some termination condition is satisfied generates a list of samples with successively higher likelihoods; these are used to infer the properties of the posterior distribution and to calculate the Bayesian evidence.

The constraint that successive samples must have higher likelihoods means that each sample can be thought of as representing the region of the prior with likelihood values in between the likelihood values of the previous and subsequent samples. The region of the prior being sampled and the fraction of the prior being represented by each sample shrinks exponentially as the algorithm proceeds to higher likelihoods. The key insight of nested sampling is that the rate of this shrinkage, while not known exactly, can be estimated statistically. Furthermore, these statistical estimates of the fraction of the prior represented by each sample can be used to weight the samples. With appropriate weights, the samples can be viewed as weighted samples from the posterior and can also be used to calculate the Bayesian evidence.

Several modifications to the aforementioned nested sampling algorithm aimed at making it more computationally efficient have been proposed in the literature. One popular variant is dynamic nested sampling, in which the number of samples taken in different likelihood ranges is varied to maximize calculation accuracy by taking more samples in the regions with the most importance to calculation accuracy. Dynamic nested sampling can achieve large improvements in efficiency over standard nested sampling, especially for high-dimensional parameter estimation problems.

...

  • Loading...
locked icon

Sign in to access this content

Get a 30 day FREE TRIAL

  • Watch videos from a variety of sources bringing classroom topics to life
  • Read modern, diverse business cases
  • Explore hundreds of books and reference titles

Sage Recommends

We found other relevant content for you on other Sage platforms.

Loading