In fitting a model with several variable I have found extremely useful a method involving the minimization of the Chi Square using a MCMC approach. In particular, I followed this tutorial http://sciencehouse.wordpress.com/2010/06/23/mcmc-and-fitting-models-to-data/

However, I cannot find around any other source. Since I will use this method for a scientific work, I would like to a) be sure that the method is theoretically correct b) cite a peer-reviewed source.

Running several simulation with complex model (6/7 parameters) showed me that the model actually works really fine, retrieving the parameter within a small error most of the time.

In particular, I am not sure about the use of $exp(-\chi^2) $ for the likelihood. Is this justified? I also tried to calculate the ratio by just dividing the oldChi2 with the newChi2, and the results were, again, satisfying. Is there any relevant difference between these two methods? Thank you

  • $\begingroup$ This is nothing fancy, it's simply a Metropolis algorithm. Also, if you look closely, $\exp\left(-\chi^2 \right)$ is a Gaussian density. $\endgroup$
    – Donnie
    Aug 26, 2014 at 18:32
  • $\begingroup$ I understand that, but I wonder if there is any important theoretical reason to use exp(-X^2). Could I just calculate the likelihood ratio as X^2_old/X^2new? $\endgroup$
    – Vaaal
    Aug 26, 2014 at 22:35
  • $\begingroup$ If you want to use the Metropolis algorithm as in the blog post, then you must use the exponential function. The Metropolis algorithm uses the ratio of densities to accept or reject proposed values. If you drop the exponential, then you are not using the ratio of densities. $\endgroup$
    – Donnie
    Aug 27, 2014 at 11:47

1 Answer 1


Actually the Mcmc method is a good tool to find the posterior probability function. I suggest that you read the following site - - > http://dfm.io/emcee/current/ In cosmology and astrophysics this method is very useful. On the other hand, about your question of \exp(\chi^2) as likelihood, you must observe whether your error distribution is Gaussian, because there are other distribution functions for the errors.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.