3

This is a question I have always had, relating to probability and statistics.

In many applications (e.g. estimating the parameters of a probability distribution function), we almost always end up trying to optimize the "log likelihood" instead of just the "likelihood".

From a computational standpoint, I have heard that this is much easier - for example, diffrentiating the log likelihood can remove exponent terms and thus make the optimization process simpler.

From a mathematical standpoint, we are often told (without explanation) that optimizating the log likelihood function is equivalent to maximizing the original likelihood function - for example, the stationary points (i.e. where the derivatives are 0) on the log likelihood function are apparently equivalent to the stationary points on the original likelihood function. Therefore, optimizing the log likelihood function or the original likelihood function will result in identical parameter estimates.

My question relates to the mathematics of this phenomenon : Does the logarithm of a function always preserve the stationary points of the original function - and if so, why does this happen?

As a reference, I found the following quote (Why we consider log likelihood instead of Likelihood in Gaussian Distribution):

"Because the logarithm is monotonically increasing function of its argument, maximization of the log of a function is equivalent to maximization of the function itself."

Thus - how do I know that the above is true?

I will assume that "a logarithm is montonically increasing function of its argument" is true by definition - can we mathematically prove that :

  1. Maximizing the log of a function is ALWAYS equivalent to maximizing the function itself?

  2. Given any montonically increasing function - does maximizing a function and any montonically increasing transformation of this original function ALWAYS results in identical results?

Thanks!

stats_noob
  • 4,107

2 Answers2

5

It is not true that the logarithm is monotonically increasing “by definition”. It's a property that has to be proved. If, for instance, you define $\log x$ as $\int_1^x\frac{\mathrm dt}t$, then, if $0<x<y$,\begin{align}\log(y)-\log(x)&=\int_1^y\frac{\mathrm dt}t-\int_1^x\frac{\mathrm dt}t\\&=\int_x^y\frac{\mathrm dt}t\\&>0,\end{align}and therefore $\log(x)<\log(y)$.

If $F\colon\Bbb R_+\longrightarrow\Bbb R$ is monotonically increasing and if $f\colon A\longrightarrow\Bbb R_+$ is a function (with $A\subset\Bbb R$) which attains its maximum at some $a_0\in A$, then, yes, $F\circ f$ attains its maximum at $a_0$ too. That's so because, if $a\in A$, then $f(a)\leqslant f(a_0)$, and therefore, since $F$ is monotonically increasing, we also have $F\bigl(f(a)\bigr)\leqslant F\bigl(f(a_0)\bigr)$. On the other hand, if $F\circ f$ attains its maximum at $a_0$, then for every $a\in A$, we have to have $f(a)\leqslant a_0$; otherwise, there would be some $a\in A$ such that $f(a)>f(a_0)$, in which case $F\bigl(f(a)\bigr)>F\bigl(f(a_0)\bigr)$.

Joe
  • 22,603
  • @ Jose: thank you for your answer! – stats_noob Dec 01 '22 at 09:01
  • You might say whether you are requiring $0 < x < y$ or $1 \le x < y$ at the start – Henry Dec 01 '22 at 09:52
  • 1
    @Henry Why? The domain of $\log$ is $(0,\infty)$ and I am proving that $x<y\implies\log(x)<\log(y)$. Of course that I am assuming that $0<x<y$. If I was assuming that $1\leqslant x<y$, then I would only be proving that the restriction of $\log$ to $[1,\infty)$ is strictly increasing. – José Carlos Santos Dec 01 '22 at 10:20
  • @JoséCarlosSantos: I think Henry's point was that upon reading the line $\log(y)-\log(x)=\int_1^y\frac{\mathrm dt}t-\int_1^x\frac{\mathrm dt}t$, the reader might wrongly assume that $x$ and $y$ need to be greater than or equal to $1$, since most of the time we deal with the integrals of the form $\int_{a}^{b}f$, we have that $a\le b$. But here, we need only require that $0<x<y$; the argument works the same even if one or both of $x$ and $y$ are less than $1$. I edited your answer to clarify this. I hope you don't mind. – Joe Dec 02 '22 at 00:05
  • @Henry: alternatively, it follows from the definition and the Fundamental Theorem of Calculus that $\log$ is differentiable on $(0,\infty)$ and $\frac{d}{dx}(\log x)=\frac{1}{x}>0$ so $\log$ is increasing on $(0,\infty)$. – Taladris Dec 02 '22 at 00:11
  • Maybe it should be mentioned that $\log$ in this answer is the natural logarithm (nowadays more commonly denoted by $\ln$) and not the common logarithm in base $10$. Both are actually increasing. – Taladris Dec 02 '22 at 00:13
  • @Taladris Do you have some support to your assertion that the natural logarithm is nowadays more commonly denoted by $\ln$? – José Carlos Santos Dec 02 '22 at 07:15
2

Jose Carlos Santos perfectly answered about the monotonicity of the logarithm. I will try to answer the other question.

Assume that $g$ is an increasing function with domain $D$ included in $\mathbb R$ and $f$ any function. For example, $g$ could be any logarithm with a base $a>1$. Here is a list of properties that are preserved by $g$. Proving those facts is a good exercise. They follow from the definitions and the fact that $g$ is one-to-one, hence has an inverse (with domain the range of $g$) and $g^{-1}$ is also increasing.

The list:

A. $f$ is increasing (resp. decreasing) if and only if $g\circ f$ is increasing (resp. decreasing).

B. $f$ has a absolute maximum at $a$ (resp. local minimum at $a$) if and only if $g\circ f$ has a absolute maximum at $a$ (resp. local minimum at $a$)

C. $f$ has a local maximum at $a$ (resp. local minimum at $a$) if and only if $g\circ f$ has a local maximum at $a$ (resp. local minimum at $a$)

I think that we cannot say anything about the concavity of $f$ from the concavity of $g\circ f$.

A last one:

If $f$ is even, then $g\circ f$ is also even.

Note that if $f$ is odd, then $g\circ f$ may or may not be even.

Taladris
  • 12,203
  • 5
  • 35
  • 61
  • @ Taladris: thank you for your answer! What do you mean by "I will try to answer the other question" - which other question? Thank you! – stats_noob Dec 02 '22 at 00:33
  • Actually, Jose Carlos Santos discussed points B and C of the list above. Lack of sleep and a shower made me forget it – Taladris Dec 02 '22 at 00:35
  • Thank you so much! I wonder why no one "liked/upvoted" my question? – stats_noob Dec 02 '22 at 04:32