# MCMC methods - burning samples?

In MCMC methods, I keep reading about burn-in time or the number of samples to "burn". What is this exactly, and why is it needed?

### Update:

Once MCMC stabilizes, does it remain stable? How is the notion of burn-in time related to that of mixing time?

-
The phrase 'burn-in' doesn't imply 'burning' the samples, but letting the system satisfactorily settle out of its "new" state to one where it's suitable for use. (The samples are discarded during the settling in, yes, but the phrase doesn't imply 'burning' in that sense. It's nearer to 'warming up the engine' before taking it on the road.) See this answer for some discussion of what it's for. – Glen_b Mar 5 '14 at 1:59
(Specifically, the first paragraph of that answer) – Glen_b Mar 5 '14 at 2:05
@Glen_b, I guess I knew that, but I do like the mental image of the dubious samples going up in smoke better.... – Matt Krause Mar 5 '14 at 5:07

Burn-in is intended to give the Markov Chain time to reach its equilibrium distribution, particularly if it has started from a lousy starting point. To "burn in" a chain, you just discard the first $n$ samples before you start collecting points.

The idea is that a "bad" starting point may over-sample regions that are actually very low probability under the equilibrium distribution before it settles into the equilibrium distribution. If you throw those points away, then the points which should be unlikely will be suitably rare.

This page gives a nice example, but it also points out that burn-in is more of a hack/artform than a principled technique. In theory, you could just sample for a really long time or find some way to choose a decent starting point instead.

Edit: Mixing time refers to how long it takes the chain to approach its steady-state, but it's often difficult to calculate directly. If you knew the mixing time, you'd just discard that many samples, but in many cases, you don't. Thus, you choose a burn-in time that is hopefully large enough instead.

As far as stability--it depends. If your chain has converged, then...it's converged. However, there are also situations where the chain appears to have converged but actually is just "hanging out" in one part of the state space. For example, imagine that there are several modes, but each mode is poorly connected to the others. It might take a very long time for the sampler to make it across that gap and it will look like the chain converged right until it makes that jump.

There are diagnostics for convergence, but many of them have. Hard time telling true convergence and pseudo-convergence apart. Charles Geyer's chapter (#1) in the Handbook of Markov Chain Monte Carlo is pretty pessimistic about everything but running the chain for as long as you can.

-
Thanks. I have added a small update to the OP with the hope of clarifying the concept further. – Amelio Vazquez-Reina Mar 5 '14 at 2:17
I added a bit more; hope that helps. – Matt Krause Mar 5 '14 at 4:53

The Metropolis-Hastings algorithm randomly samples from the posterior distribution. Typically, initial samples are not completely valid because the Markov Chain has not stabilized to the stationary distribution. The burn in samples allow you to discard these initial samples that are not yet at the stationary.

-
Thanks - Once the Markov chain stabilizes, does it remain stable? How does this related to the notion of mixing-time? Is it the same? – Amelio Vazquez-Reina Mar 5 '14 at 1:58