# R CODE TO DRAW BETA(a,b) DENSITIES FOR a,b = 1,2,3,4: x<-seq(0,1,length=101) par(mfrow=c(4,4)) for (i in 1:4){ for (j in 1:4){ plot(x,dbeta(x,i,j),type="l",xlab="p",ylab="density", ylim=c(0,4)) title(paste("Beta(",i,",",j,")")) }}