### Problem 8.6c ### Plot the log-likelihood for n = 10, x = 5 # Since the Likelihood is a function of p, we will # evaluate the Log.Lik for values of p between 0 and 1. p <- seq(0,1,0.001) n <- 10 x <- 5 Log.Lik <- function(p){ x*log(p) + (n-x)*log(1-p) } plot(p, Log.Lik(p), type='l')