### Use of the Bolstad R library # Suppose we draw one ball from an urn containing 6 balls, with # xi = 0,1,2,3,4,5 possible Red balls. library(Bolstad) help(binobp) # with beta prior n = 1 # draw one ball x = 1 # one ball drawn and it is a Red # The function binodp with a continuous prior. binobp(x,n, a=1, b=1) # uniform prior on theta n = 2 # draw two balls x = 1 # one ball drawn and it is a Red # The function binodp with a continuous prior. binobp(x,n, a=1, b=1) # uniform prior on theta # Now draw twice and observe one Red binobp(x,n, a=2, b=2) # prior centered at 0.5