Posts

Nested sampling

Image
Nested sampling is a stochastic algorithm to evaluate the evidence  of a Bayesian problem $$ Z = p(d | \mathcal{H}) = \int p(d | \boldsymbol{\theta}, \mathcal{H})  p(\boldsymbol{\theta}| \mathcal{H}) d\boldsymbol{\theta}$$ where $d$ is the observed data, $\boldsymbol{\theta}$ is the set of model parameters, $\mathcal{H}$ is the hypothesis assumed. This quantity means the likelihood to observe the data $d$ if the hypothesis $\mathcal{H}$ is true. When we only have the observation, but we don't know what is the underlying mechanism, we can use the evidence to statistically quantify which candidate model explains the data the best. Transformation of the integral In literature of nested sampling, we usually use $\mathcal{L}(\boldsymbol{\theta})$ to represent the likelihood $p(d | \boldsymbol{\theta})$, and $\pi(\boldsymbol{\theta})$ to represent the prior $p(\boldsymbol{\theta})$, then the evidence is written as $$Z = \int \mathcal{L}(\boldsymbol{\theta}) \pi(\boldsymbol{\theta})d...