rm(list=ls()) #-----------------------------------------------------# #--- Class 3: Prior and Posterior distribution ---# #-----------------------------------------------------# #-- The prior distribution: Example: Fair or two headed coin #-- b) plot(0,0, xlim=c(0,1), ylim=c(0,5), type="n", xlab=expression(theta), ylab=expression(xi(theta)), main="prior") curve(dbeta(x, 5, 1), 0, 1, add=TRUE, col="blue", lwd=3) curve(dbeta(x, 1, 5), 0, 1, add=TRUE, col="green", lwd=3) curve(dbeta(x, 5, 5), 0, 1, add=TRUE, col="red", lwd=3) curve(dbeta(x, 1, 1), 0, 1, add=TRUE, col="black", lwd=3)