What is the log-likelihood function?

1 Answer
Jul 20, 2016

It is a term used to denote applying the maximum likelihood approach along with a log transformation on the equation to simplify the equation.

Explanation:

For example suppose i am given a data set #X in R^n# which is basically a bunch of data points and I wanted to determine what the distribution mean is. I would then consider which is the most likely value based on what I know. If I assume the data comes from the normal distribution #N(mu,sigma^2)# with #mu# as the mean and #sigma^2# as the variance then we have #f(X|mu,sigma^2) =prod_i^n 1/sqrt(2pi sigma ^2)e^(-1/(2sigma^2)(x_i-mu)^2)#.

If #mu# is not known then I would try to estimate it by way of maximum likelihood or using the equation I would state

#l(mu|X,sigma^2)=prod_i^n 1/sqrt(2pi sigma ^2)e^(-1/(2sigma^2)(x_i-mu)^2)#

Here the equation is the same but the paramter of interest is #mu#. To solve we take the derivative, set it equal to 0 and solve for #mu# so we have.

#(partial)/(partialmu) prod_i^n 1/sqrt(2pi sigma ^2)e^(-1/(2sigma^2)(x_i-mu)^2) #

However before doing so I see that I can apply the natural log before finding the derivative to solve for #x# and simplify the equation thus ...

#ln(l(mu|X,sigma^2))= sum_i^n ln(1/sqrt(2pi sigma ^2)) -1/(2sigma^2)(x_i-mu)^2 #

#(partial)/(partialmu) sum_i^n ln(1/sqrt(2pi sigma ^2)) -1/(2sigma^2)(x_i-mu)^2 #
#= 1/(sigma^2)sum_i^n(x_i-mu) =0#
#= 1/(sigma^2)sum_i^nx_i = 1/(sigma^2)sum_i^nmu#
#= sum_i^nx_i = n*mu#
#= 1/nsum_i^nx_i = mu#

so an approximation of #mu# would be the average of the data or #barx = 1/nsum_i^nx_i#.

Using MLE we can also find out what the estimated standard deviation is.