### Use of the Bolstad R library # Bayesian inference for the Binomial p, one sample of size n, # conjugate Beta prior library(Bolstad) help(binobp) # beta prior # binobp(x, n, a = 1, b = 1, ret = FALSE) ####################################################################### n = 1 # draw one ball x = 1 # one ball drawn that is a "success" binobp(x,n, a=1, b=1) # uniform prior on theta ####################################################################### n = 2 # draw one balls x = 1 # one ball drawn that is a "success" binobp(x,n, a=1, b=1) # uniform prior on theta ####################################################################### n = 30 # draw one balls x = 20 # one ball drawn that is a "success" binobp(x,n, a=1, b=1) # uniform prior on theta ####################################################################### n = 300 # draw one balls x = 200 # one ball drawn that is a "success" binobp(x,n, a=1, b=1) # uniform prior on theta ####################################################################### n = 30 # draw one balls x = 20 # one ball drawn that is a "success" binobp(x,n, a=2, b=2) # non-uniform prior on theta ####################################################################### n = 300 # draw one balls x = 200 # one ball drawn that is a "success" binobp(x,n, a=2, b=4) # non-uniform prior on theta