Chapter 6 Maximum Likelihood Estimation

In general, when we observe independent and identically distibuted data y1,,ynp(y;θ), the maximum likelihood estimate of the parameter vector θ is the value that maximizes the log-likelihood of θ, which can be written as ni=1logp(yi;θ). However, what if the data are not independent? How can we write down and maximize the log-likelihood?