1predplot=function(prior,n,yobs)
2{
3	y=0:n; a=prior[1]; b=prior[2]
4	probs=pbetap(prior,n,y)
5      m=max(probs)*1.05
6	plot(y,probs,type="h",ylab="Probability",ylim=c(0,m),
7 main=paste("Predictive Dist., beta(",a,",",b,") prior, n=",n,
8            ", yobs=",yobs),lwd=2,col="blue")
9	points(yobs,0,pch=19,cex=2.5,col="red")
10      text(yobs,m/8,"yobs",col="red")}