It has less chances of getting trapped in the first local minimum it encounters. Confidence intervals can be directly calculated as the same time the algorithm is looking for the best parameter values. Let be the probability distribution that a set of data D will be collected given a model M with a set of parameter values . Using Bayes' theorem, it is possible to invert to get , the probability distribution that will be observed given a model and a set of data. This distribution may be used to define best parameter values and suitable confidence intervals on those values.
Equation simply states that is proportional to the likelihood.
The 's are the predictions of the model M for the set of parameter values . In read-out and sky noise limited CCD images, the photon noise due to the galaxy signal is negligible, and the 's are all equal to the background noise , so . The background noise was determined for each spectrum by computing image statistics in four regions at the corners of the spectrum. The Metropolis algorithm starts with some set of parameter values and the associated . It then picks a possible change in the parameters and computes .