Homework 1

Problem 1

Below is a sample from a Poisson random variable with parameter \(\lambda\).

cat(x)
7 7 9 9 10 10 10 11 11 11 11 11 11 11 11 11 12 12 12 12 12 12 12 13 13 13 13 13 13 13 13 13 14 14 14 15 15 15 15 16 16 16 16 16 16 16 17 18 22 28
  1. Draw the log likelihood curve using ggplot2

  2. Find the maximum likelihood estimate of \(\lambda\)

    • using calculus
    • using the routine fitdistr
    • using grid search

Problem 2

The file hw1p2.txt at http://academic.uprm.edu/wrolke/esma6836 has the following data set:

This is a mixture of a Beta(1, \(\beta\)) and a normal distribution. Use the EM algorithm to estimate the parameters and draw the histogram with the fitted density.