Solved – Can log likelihood function be negative

aiclikelihood

I do some optimization problem in R. I minimize the loglikelihood function. I found that the log-likelihood has a negative value. For example, I have this: -34.5. Then, when I count the AIC, I will get, a positive value for AIC. My question, Is it ok to have negative loglikelihood values (I am working with continuous data).

Best Answer

The likelihood function is defined as

$$ \mathcal{L}(\theta|X) = \prod_{i=1}^n f_\theta(X_i) $$

and is a product of probability mass functions (discrete variables) or probability density functions (continuous variables) $f_\theta$ parametrized by $\theta$ and evaluated at the $X_i$ points.

Probability densities are non-negative, while probabilities also are less or equal to one. It follows that their product cannot be negative. The natural logarithm function is negative for values less than one and positive for values greater than one. So yes, it is possible that you end up with a negative value for log-likelihood (for discrete variables it will always be so).