Gibbs sampling

Here’s a short note on Gibbs sampling, explaining a simple case with two random variables: gibbs.pdf. Source code: gibbs_2x2.py (run this file using Sage). You can browse all the related files here.

My note and source code follows the 2×2 example in this paper (click for a local copy): Casella, George; George, Edward I. (1992). “Explaining the Gibbs sampler”. The American Statistician 46 (3): 167–174.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s