# How do MCMC methods allow the estimation of the posterior distribution in this example?

I am reading a book example (diagram from p10) in which a person scores 9/10 on which we assumed a uniform prior. The posterior distribution could be easily worked out analytically, but the book gives an example of estimating the posterior distribution by MCMC methods. I can see from the bottom part of the diagram that about about 95% of samples had a theta of between 0.59 and 0.98, where theta represents 'ability' in the sense of accuracy rate on these tests. However, I don't understand how a theta value is obtained for each sample in the chain, and what the relationship is between a sample in a chain and the proceeding sample. The book also does not explain why three chains are chosen or where the initial values for these chains come from.

• How MCMC works in general is asked/answered in stats.stackexchange.com/questions/73629 Jun 23 '14 at 16:43
• Furthermore, note that based on box 2.2 on page 25, the book in question does not attempt to explain how/why MCMC works, but you need read other sources for that. If after consulting other sources you have some specific questions about this particular example, please edit the question to address those specific concerns. In my opinion, the question as it now stands is essentially 'how MCMC works' which is pretty broad and/or asked already. Jun 23 '14 at 17:20
• I'd read the Kruschke reference they suggested as the best one to start with, and hadn't been able to follow it sufficiently to understand the diagram, and so I posted my question here instead of moving onto the references they describe as "more technical". I'll edit the question to make it clearer that I'm not simply asking how MCMC works. Jun 24 '14 at 0:30

So in this case the $\theta$ draws are computed by initializing the Markov chain, "burning it in" for several thousand iterations to start moving towards limiting behavior, then just watching it bounce around. $\theta$ is the value of the chain at each sample. The relationship between samples is the transition relationship in the Markov chain.