Using Allen Downey's ThinkBayes library