Tutorials › Statistical Theory I - Probability and Distribution Theory › Why Density Modes Can Be Misleading

Support, Quantiles, and Tails · Tutorial 88 of 994

Why Density Modes Can Be Misleading

Learn when a density mode is meaningful, how it depends on the density version and measurement scale, and how to recognize nonunique or unstable maxima.

Beginner 10 min read

What You'll Learn

  • Explain why densities that differ at isolated points can describe the same distribution
  • Interpret density values through local averages at Lebesgue points
  • Distinguish a change of measurement units from a nonlinear transformation
  • Calculate how a nonlinear transformation changes a density mode
  • Identify flat or nonunique density modes
  • Recognize how small probability changes can cause large shifts in the mode

Introduction

A density plot can make a mode look like a simple, objective feature: locate the highest point and read off its horizontal coordinate. But a density is not a probability at a point, and its values can depend on details that do not change the distribution. A nonlinear change of measurement scale can also alter which value has the highest density. These facts do not make modes useless; they do mean that a density mode must be interpreted with care.

The key distinction is between a probability distribution and a particular formula used to represent it. A density is defined only up to changes on sets of Lebesgue measure zero. Consequently, the maximum of a chosen density formula need not be a feature of the distribution alone. Even when a smooth density gives a clear maximum, the mode may be nonunique or sensitive to small changes in the distribution.

Density Values and Density Versions

Definition: A density of a random variable \(X\) is a nonnegative measurable function \(f\) such that, for every Borel set \(A\), $$ P(X\in A)=\int_A f(x)\,dx. $$ Two densities that are equal except on a set of Lebesgue measure zero are called versions of the same density. A pointwise density mode of a specified version \(f\) is a point \(x\) at which \(f\) attains its global supremum, if such a point exists.

Changing a density at a single point does not change any of its integrals, and therefore does not change the distribution. More generally, changes on any set of Lebesgue measure zero leave all probabilities unchanged. This is why a density should not be treated as a uniquely specified curve at every point.

Theorem: If \(f\) and \(g\) are nonnegative measurable densities and \(f=g\) almost everywhere, then they define the same distribution. Conversely, if they define the same distribution, then \(f=g\) almost everywhere.

For the forward implication, let \(A\) be any Borel set. Since \(f=g\) almost everywhere, their integrals over \(A\) are equal:

$$ \int_A f(x)\,dx=\int_A g(x)\,dx. $$

Thus they give the same probability to every Borel set. For the converse, suppose the integrals are equal over every Borel set. If the set \(B=\{x:f(x)>g(x)\}\) had positive measure with \(f>g\) on it, then at least one of the sets \(B_k=\{x:f(x)\geq g(x)+1/k\}\), for positive integers \(k\), would have positive measure. Integrating over that set would give \(\int_{B_k} f>\int_{B_k}g\), contradicting equality of the probabilities. The same argument applied to \(\{g>f\}\) shows that this set also has measure zero. Hence \(f=g\) almost everywhere. \(\square\)

This theorem explains the first limitation of a pointwise mode: the distribution determines a density only up to almost-everywhere equality, whereas the maximum of a formula can depend on its values at individual points.

Worked Example: Changing a Density at One Point

Let \(X\) be uniform on \((0,1)\), with density \(f(x)=1\) for \(0<x<1\) and \(f(x)=0\) otherwise. Define another version \(g\) by leaving \(f\) unchanged except that \(g(1/2)=100\).

For every Borel set \(A\), the integral of \(g\) over \(A\) equals the integral of \(f\) over \(A\), because the two functions differ only at one point. Thus \(g\) describes exactly the same uniform distribution. Yet the pointwise maximum of \(g\) is 100 at \(1/2\), while the ordinary version \(f\) has maximum 1 at every point of \((0,1)\). The first formula gives a unique pointwise maximizer; the second gives an entire interval of maximizers.

The value \(g(1/2)=100\) does not mean that probability accumulates near \(1/2\) at a rate of 100 per unit length. For \(0<h<1/2\), the average density across the interval \((1/2-h,1/2+h)\) is $$ \frac{1}{2h}\int_{1/2-h}^{1/2+h}g(x)\,dx =\frac{1}{2h}(2h)=1. $$ That interval has probability \(2h\), just as it does under \(f\). The isolated value 100 contributes nothing to the integral.

When a Density Value Has a Local Interpretation

There is a precise qualification to the idea that density represents probability per unit of measurement. A point \(x\) is a Lebesgue point of a locally integrable function \(f\) if

$$ \lim_{h\downarrow 0}\frac{1}{2h}\int_{x-h}^{x+h}|f(t)-f(x)|\,dt=0. $$

At such a point, the average density over a shrinking symmetric interval tends to the value \(f(x)\). In particular, whenever \(x\) is a Lebesgue point of a density,

$$ \lim_{h\downarrow 0}\frac{P(x-h<X<x+h)}{2h} =\lim_{h\downarrow 0}\frac{1}{2h}\int_{x-h}^{x+h}f(t)\,dt =f(x). $$

The Lebesgue differentiation theorem says that a locally integrable function has this property at almost every point. If a density is continuous at an interior point, that point is a Lebesgue point: continuity makes \(|f(t)-f(x)|\) uniformly small throughout a sufficiently small interval around \(x\). But a density value assigned arbitrarily at a point need not be a Lebesgue point, as the modified value in the uniform example shows. The safe interpretation is therefore conditional: at a Lebesgue point, the density value is the limiting average probability per unit length over shrinking neighborhoods. An arbitrary pointwise value does not necessarily have that interpretation.

Changing the Measurement Scale

Density values are measured relative to the units on the horizontal axis. A density per centimetre and a density per metre have different numerical heights, although they describe the same probabilities. A simple linear conversion multiplies all density values by the same positive constant, so it maps the mode to the corresponding converted value. A nonlinear transformation generally does more: its changing local scale contributes a Jacobian factor that can change which point maximizes the density.

Theorem: Let \(X\) have density \(f\), and let \(Y=T(X)\), where \(T\) is a strictly monotone, continuously differentiable function on an interval containing the support of \(X\), with \(T'(x)\neq 0\) there. Write \(x=T^{-1}(y)\). Then a density of \(Y\) is $$ f_Y(y)=f\bigl(T^{-1}(y)\bigr)\left|\frac{d}{dy}T^{-1}(y)\right|. $$

To verify the formula, take a Borel set \(A\) in the range of \(T\). By the density definition and the fact that \(Y=T(X)\),

$$ P(Y\in A)=\int_{\{x:T(x)\in A\}}f(x)\,dx. $$

Apply the one-dimensional change-of-variables formula with \(y=T(x)\). Since \(T\) is strictly monotone, it has an inverse on the interval, and the absolute derivative accounts for either direction of monotonicity. The result is

$$ P(Y\in A) =\int_A f\bigl(T^{-1}(y)\bigr)\left|\frac{d}{dy}T^{-1}(y)\right|\,dy. $$

This is the defining integral identity for the displayed density, proving the formula. The Jacobian factor depends on \(y\) for a nonlinear transformation, so a maximum of \(f\) need not transform to a maximum of \(f_Y\). \(\square\)

Worked Example: A Normal Variable on a Logarithmic Scale

Let \(X\sim N(0,1)\), whose density has its maximum at \(x=0\). Set \(Y=e^X\), so that \(T^{-1}(y)=\log y\) and \(dT^{-1}(y)/dy=1/y\) for \(y>0\). The transformation formula gives

$$ f_Y(y)=\frac{1}{y\sqrt{2\pi}}\exp\left(-\frac{(\log y)^2}{2}\right),\qquad y>0. $$

To find the maximum, differentiate the log-density: $$ \frac{d}{dy}\log f_Y(y) =-\frac{1}{y}-\frac{\log y}{y} =-\frac{1+\log y}{y}. $$

Because \(y>0\), the derivative is positive when \(y<e^{-1}\) and negative when \(y>e^{-1}\). Thus the density of \(Y\) has its unique mode at \(e^{-1}\), not at \(e^0=1\), the transformed value of the mode of \(X\). As a direct check, \(f_Y(1)=1/\sqrt{2\pi}\), whereas \(f_Y(e^{-1})=e/\sqrt{2\pi}\), which is larger. The change in mode comes from the factor \(1/y\), not from any change in the underlying information carried by \(X\) and \(Y\).

For a linear rescaling \(Y=aX+b\), with \(a\neq 0\), the density is \(f_Y(y)=f((y-b)/a)/|a|\). Since the multiplier \(1/|a|\) is constant, a mode of the chosen density \(f\) maps to a mode of \(f_Y\) under this transformation. Heights still change with units; nonlinear transformations can change the modal location as well.

Nonunique and Unstable Modes

A density can have several maximizers or a whole interval of them. In the first case, there is no single pointwise mode; in the second, the formula supplies a set of equally high locations. Even a unique mode may be unstable: a small change in total probability can create a narrow, tall peak that moves the maximizer far away. The following examples show why a plot should be read as a description of a chosen density, not as a guarantee of a stable or unique feature.

Worked Example: A Flat Set of Modes

Consider \(f(x)=1/2\) for \(0\leq x\leq 2\), and \(f(x)=0\) otherwise. Its integral is $$ \int_{-\infty}^{\infty}f(x)\,dx =\int_0^2\frac12\,dx=1, $$ so it is a density. Its maximum value is \(1/2\), attained at every point of \([0,2]\). The pointwise mode set is therefore the whole interval, not a single location. Reporting one number as “the mode” would discard the nonuniqueness expressed by the density.

Worked Example: A Small Probability Change That Moves the Mode

For a real number \(a\), define the triangular density \(b_a(x)=(1-|x-a|)_+\), where \(u_+=\max(u,0)\). Its support is \([a-1,a+1]\), its height at \(a\) is 1, and its integral is 1. For \(0<\varepsilon<1/2\), define a narrower triangular density $$ b_{2,\delta}(x)=\frac{1}{\delta}\left(1-\frac{|x-2|}{\delta}\right)_+,\qquad \delta=\varepsilon^2, $$ and the mixture $$ f_\varepsilon(x)=(1-\varepsilon)b_{-2}(x)+\varepsilon b_{2,\varepsilon^2}(x). $$

Each component integrates to 1, so \(f_\varepsilon\) is a density. The components have disjoint supports: the first lies in \([-3,-1]\), while the second lies in \([2-\varepsilon^2,2+\varepsilon^2]\). At their respective peaks, the mixture has heights \(1-\varepsilon\) at \(-2\) and \(\varepsilon/\varepsilon^2=1/\varepsilon\) at \(2\). Since \(1/\varepsilon>1-\varepsilon\) for \(0<\varepsilon<1/2\), the unique mode is \(2\).

At \(\varepsilon=0\), the density is \(b_{-2}\), whose unique mode is \(-2\). Yet the distributions are close in the sense that $$ \int_{-\infty}^{\infty}|f_\varepsilon(x)-b_{-2}(x)|\,dx =\varepsilon\int b_{-2}(x)\,dx+\varepsilon\int b_{2,\varepsilon^2}(x)\,dx =2\varepsilon. $$ This distance tends to zero as \(\varepsilon\) tends to zero, while the mode remains at \(2\), far from \(-2\). A small amount of probability placed in a sufficiently narrow peak can therefore determine the mode.

Common Mistakes and Practical Checks

  • Reading a pointwise height as nearby probability. A large assigned value at one point can leave every neighborhood probability unchanged. Use a local-average interpretation only at a Lebesgue point; continuity at an interior point is a sufficient condition.
  • Treating a density formula as unique. Densities equal almost everywhere describe the same law, even if their pointwise maxima differ. Ask whether a claimed mode is a property of a particular regular density version or is supported by additional shape information.
  • Assuming every transformation carries modes along unchanged. A nonlinear change of variable includes a Jacobian factor. Recalculate the transformed density before identifying its mode.
  • Reporting a unique mode when the maximum is tied or flat. Check the full set of maximizers, not only the first point at which a graph appears to peak.
  • Taking a sharp peak as evidence of stability. A narrow peak can have little probability mass and still determine the maximum. Compare the modal claim with the overall density and its sensitivity to small changes.

Density modes are useful summaries when the density version and measurement scale are specified and the maximum is well-defined and reasonably stable. Their height is not a point probability, and their location is not automatically invariant under nonlinear changes of scale. Stating the scale, checking for ties, and distinguishing a genuine local density value from an arbitrary point assignment make modal descriptions more informative.

Check Your Understanding

Try these questions before moving on.

  1. Two density formulas differ only at one point. Explain why they define the same distribution, and why their pointwise modes may differ.
  2. What condition on a point allows the density value there to equal the limiting average probability per unit length over shrinking symmetric neighborhoods?
  3. If \(Y=2X+3\), how does a mode of a specified density for \(X\) map to a mode for \(Y\), and how do the density heights change?
  4. Why does the mode of \(e^X\) in the worked normal example differ from the exponential of the mode of \(X\)?
  5. In the triangular-mixture example, why can a component with very small probability determine the mode?