4
$\begingroup$

If the function $f(x)$ is continuous and a probability density function (PDF), how can I show that its mode is at $f'(x)=0$?

$\endgroup$
  • 3
    $\begingroup$ As per Christoph's answer, this does not hold. Not even if $f$ is everywhere differentiable (it could have a vanishing derivative at a minimum at the extremes of its domain of definition). $\endgroup$ – Stephan Kolassa Oct 8 '15 at 11:53
  • 1
    $\begingroup$ @Stephan The logic of the question is a little different. It does not ask to show that all points of vanishing derivative are modes, but only that the derivative at a mode must vanish. (The only way that can fail to be true is when $f$ is not differentiable at its mode.) $\endgroup$ – whuber Oct 8 '15 at 15:01
  • 1
    $\begingroup$ you might read it either way, I guess: show that its mode is at $f'(x)=0$ seems compatible with the aim to show the (false, as we discussed) implication $f'(x)=0\Rightarrow\text{a mode}$ $\endgroup$ – Christoph Hanck Oct 8 '15 at 16:08
12
$\begingroup$

If it's only continuous but not differentiable at the mode, you can't. Consider the Laplace distribution.

enter image description here

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Also see en.wikipedia.org/wiki/Uniform_distribution_(continuous)#/media/…, the density for the continuous uniform distribution on [a, b]. There are points outside [a, b] where df/dx = 0. $\endgroup$ – Adrian Oct 8 '15 at 12:23
  • $\begingroup$ Same comment as above, but better example: en.wikipedia.org/wiki/Triangular_distribution#/media/…, the triangular distribution (can be generated as the sum of two iid uniforms). $\endgroup$ – Adrian Oct 8 '15 at 12:40
  • $\begingroup$ Better than my first comment, but not better than your answer! My comments were intended as additional examples for the OP, not as contradicting your answer. $\endgroup$ – Adrian Oct 8 '15 at 13:16
  • 1
    $\begingroup$ @Adrian The uniform distribution is not a valid counterexample, because no version of its density can be continuous, as required by the question. $\endgroup$ – whuber Oct 8 '15 at 14:59
2
$\begingroup$

Find the maximum value. The Laplace distribution is defined piece-wise, and not smooth at the mode, which is at the piece-wise common point (A.K.A., corner point), and such a common, junctional corner point in a piece-wise defined function has no general continuity guarantee of either the separate piecewise defined functions' amplitudes nor any of their derivatives. The mode for a Laplace distribution occurs at $\frac{e^{-\frac{x-\mu }{\beta }}}{2 \beta }=\frac{e^{-\frac{\mu -x}{\beta }}}{2 \beta }\to x=\mu$, because $f(x=\mu)=\frac{1}{2 \beta }$ is the maximum value of $f$. Of course there are continuous functions that are differentiable nowhere, and differentiability is not a requirement. Thus, the general answer is simply find the maximum of the pdf. This can be done in closed form as above for something as simple as the Laplace distribution. It can be done numerically for nice smooth functions using derivatives example by referring to How to prevent newton's method from finding maxima? and altering it to avoid minima. Or, more generally for nasty functions using a canned routine like FindMaximum in Mathematica with a global search routine like RandomSearch.

@Glen_b and @Dougal, thanks for the help, anything further @me.

| cite | improve this answer | |
$\endgroup$
  • 2
    $\begingroup$ The mode is not at a boundary for the Laplace (which is defined - and continuous - over the whole real line). It's not cheating but a perfectly valid counterexample. If people don't account for such possibilities, they will be wrong when they try to make general statements. I suspect you misunderstand what a boundary is in this case (an example of a case where you'd worry about the mode being at a boundary would be the case of an ordinary exponential distribution at 0). $\endgroup$ – Glen_b Mar 26 '17 at 9:01
  • 2
    $\begingroup$ @Carl If you define the Laplace distribution piecewise for the negative and positive reals, then sure, the mode 0 is at a boundary of each sub-part. But in the standard way of thinking about it, the Laplace density is just a function $\frac12 \exp(- \lvert x \rvert )$ defined on $\mathbb R$, and $0$ is in no way a boundary point of $\mathbb R$. $\endgroup$ – djs Mar 26 '17 at 16:45
  • $\begingroup$ @Carl In this case we're talking about a boundary point of the domain of the variable. The random variable is defined over the whole real line, so for the Laplace, the set $A$ in the definition you quote is $\mathbb{R}$. $\endgroup$ – Glen_b Mar 26 '17 at 17:11
  • 2
    $\begingroup$ There's only a junction there because you chose to make it one; that's not necessary to anything. It doesn't matter how you want to split a domain up, that doesn't make it a boundary. The domain is the union of the two pieces you split it into and if you look back at the definition of boundary you gave, and apply it, you can see there's no boundary point there. I don't propose to keep arguing with you, though. Your answer is wrong, I've explained why, and you refuse to change it. That's up to you. End of discussion. If you want to argue with the people over on math.SE that's up to you. $\endgroup$ – Glen_b Mar 27 '17 at 5:48
  • 1
    $\begingroup$ I removed my downvote. I still don't agree that the corner in the Laplace is in any sense cheating. It's simply a counterexample to the uncritical use of the derivative -- continuous functions can have corners. $\endgroup$ – Glen_b Mar 27 '17 at 7:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.