plot likelihood function for the following observations in r