O'Reilly logo

Doing Bayesian Data Analysis by John Kruschke

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8

Inferring Two Binomial Proportions via Gibbs Sampling

Contents

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required