# # Chapter 3 -- Bayesian Computation With R # ESP Problem # # Remove all objects just to be safe # rm(list=ls(all=TRUE)) # library(LearnBayes) # #part (a) pvalue <- 1.0-pbinom(7,20,.2) # #part (b) partbprob <-pbetat(.2,.5,c(1,4),c(8,12))$post #part (c) partcprob1 <-pbetat(.2,.5,c(.5,2),c(8,12))$post partcprob2 <-pbetat(.2,.5,c(2,8),c(8,12))$post partcprob3 <-pbetat(.2,.5,c(8,32),c(8,12))$post