Bayes Book Ch 4: Fundamental Ideas II R code # Figure 4.1 y <- 2 n <- 10 theta <- seq(0,1,0.001) lik <-choose(n,y)*theta^y*(1-theta)^(n-y) plot(theta,lik,type="l",lwd=2,xlab=expression(theta),ylab=expression(paste("L(",theta," |y)")))