1
$\begingroup$

I am new to the world world of Bayesian-MCMC inference and have been working my way through various texts. I am having some difficulty understanding how MCMC works. I understand that it is a way of sampling from the posterior distribution. What is puzzling me, however, is how the probabilities of the posterior distribution have been calculated. That is, if the Markov Chain is sampling from the posterior distribution, that posterior distribution must have probability values on some axis. How were those calculated?

$\endgroup$
2
$\begingroup$

In short, the posterior is a probability value between 0 and 1 which is calculated from Bayes rule, which In phylogenetic usage is given as the product of the prior probability and the likelihood divided by a normalising constant. The posterior probability allows you to state the probability of some hypothesis given the data at hand (as opposed to the likelihood parlance, which is probability of data given hypothesis).

In a phylogenetic setting, the sampler works (roughly) like this: propose some value of a parameter (topology, branch lengths, etc.) and use the specified prior and calculated likelihood for that parameter value given the data to calculate the unnormalised posterior. Next, propose a new value, and repeat the same step. Compare the two values, and if the posterior probability of the second is greater, accept this parameter value and repeat the cycle again. In this way the Markov Chain moves through posterior space until it reaches a reasonably stable optimal approximation of the posterior distribution. Here, we want to get as many samples as possible to maximise the accuracy of our posterior. The maximum a posteriori (MAP) value of the parameter and its credible intervals, etc, will come from the distribution of these samples.

$\endgroup$
4
  • $\begingroup$ Thank you so much! This is very clear and helpful. There is just one detail that I am hung up on, namely this step: "use the specified prior and calculated likelihood for that parameter value given the data to calculate the posterior." How can this be calculated without knowing the marginal probability/normalizing constant? $\endgroup$
    – Namenlos
    Jul 29 '18 at 18:39
  • $\begingroup$ @Namenlos this is actually related to a property of the Metropolis-Hastings algorithm: because each step of the chain explores ratios of a value which is proportional to the posterior (that is, the likelihood multiplied by the prior; the numerator of Bayes' rule), the denominator of the posterior cancels out. Samples from the chain therefore give you an estimate of the posterior probability. I've edited my answer to reflect this. $\endgroup$
    – NatWH
    Jul 30 '18 at 7:00
  • $\begingroup$ Extra details can be found in this excellent introduction to Bayesian phylogenetics $\endgroup$
    – NatWH
    Jul 30 '18 at 7:05
  • $\begingroup$ Ah, I see. Thank you again. This is starting to make sense now. $\endgroup$
    – Namenlos
    Jul 30 '18 at 18:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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