Chapter 8

Inferring Two Binomial Proportions via Gibbs Sampling


8.1 Prior, Likelihood, and Posterior for Two Proportions

8.2 The Posterior via Exact Formal Analysis

8.3 The Posterior via Grid Approximation

8.4 The Posterior via Markov Chain Monte Carlo

8.4.1 Metropolis Algorithm

8.4.2 Gibbs Sampling

8.5 Doing It with BUGS

8.5.1 Sampling the Prior in BUGS

8.6 How Different Are the Underlying Biases?

8.7 Summary

8.8 R Code

8.8.1 R Code for Grid Approximation (Figures 8.1 and 8.2)

8.8.2 R Code for Metropolis Sampler (Figure 8.3)

8.8.3 R Code for BUGS Sampler (Figure 8.6)

8.8.4 R Code for Plotting a Posterior Histogram

8.9 Exercises

I’m hurtin’ from all these rejected proposals;

My feelings, like peelings, down garbage disposals.

S’pose you ...

Get Doing Bayesian Data Analysis now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.