Posts Tagged ‘ beta distribution ’

An update on visualizing Bayesian updating

August 17, 2012
By
An update on visualizing Bayesian updating

A while ago I wrote this post with some R code to visualize the updating of a beta distribution as the outcome of Bernoulli trials are observed. The code provided a single plot of this process, with all the curves overlayed on top of one another. Then John Myles White (co-author of Machine Learning for

Read more »

A slice of infinity

July 27, 2011
By
A slice of infinity

Peng Yu sent me an email about the conditions for convergence of a Gibbs sampler: The following statement mentions convergence. But I’m not familiar what the regularity condition is. “But it is necessary to have a finite probability of moving away from the current state at all times in order to satisfy the regularity conditions on which

Read more »

Asher’s enigma

July 25, 2010
By
Asher’s enigma

On his Probability and statistics blog, Matt Asher put a funny question (with my rephrasing): Take a unit square. Now pick two spots at random along the perimeter, uniformly. For each of these two locations, pick another random point from one of the three other sides of the square and draw the segment. What is

Read more »

Weekend art in R (part 1?)

May 29, 2010
By
Weekend art in R (part 1?)

As usual click on the image for a full-size version. Code: par(bg="black") par(mar=c(0,0,0,0)) plot(c(0,1),c(0,1),col="white",pch=".",xlim=c(0,1),ylim=c(0,1)) iters = 500 for(i in 1:iters) { center = runif(2) size = rbeta(2,1,50)   # Let's create random HTML-style colors color = sample(c(0:9,"A","B","C","D","E","F"),12,replace=T) fill = paste("#", paste(color[1:6],collapse=""),sep="") brdr = paste("#", paste(color[7:12],collapse=""),sep="")   rect(center[1]-size[1], center[2]-size[2], center[1]+size[1], center[2]+size[2], col=fill, border=brdr, density=NA, lwd=1.5) }

Read more »