Tutorials › Generalized Linear Models › When A Density Value Is Not A Probability

Probability Models for Responses · Tutorial 19 of 981

When A Density Value Is Not A Probability

Distinguish density heights from probabilities and calculate probabilities for continuous responses by integrating over intervals.

Beginner 9 min read

What You'll Learn

  • Explain why a single point has probability zero under a continuous distribution
  • Calculate interval probabilities by integrating the density
  • Interpret density values using their measurement units
  • Use a density value to approximate probability over a short interval, and state when the approximation is accurate
  • Identify common errors involving density heights and point probabilities

Why a Density Height Is Not a Probability

For a continuous response, a probability describes how much probability lies across a set of possible values. A density describes how concentrated that probability is locally. These quantities are related, but they are not interchangeable: the height of a density at one response value is not the probability of observing that value.

This distinction matters whenever a model is used to answer a question such as “What is the probability that the response lies between 4 and 5?” The answer comes from the area under the density over that interval, not from reading the density height at 4, 5, or any single point.

Definition: A continuous random variable \(X\) with density \(f\) has interval probabilities $$ P(a \leq X \leq b)=\int_a^b f(x)\,dx,\qquad a\leq b. $$ A density is nonnegative and integrates to 1 over the real line. Its value \(f(x)\) is a density height, not the point probability \(P(X=x)\).

The integral has a geometric interpretation: the probability of an interval is the area under the density curve over that interval. Since the total area is 1, interval areas are probabilities between 0 and 1. A density height, however, can exceed 1. The width of the interval and the units of measurement help determine the area.

For example, if \(X\) is measured in hours, a density has units of “per hour.” Multiplying a density height by a time interval gives a dimensionless quantity, which can be a probability. A height alone still has units and therefore cannot itself be a probability.

Point Probabilities and Interval Probabilities

For a distribution with a density, any single point has probability zero. This does not mean that the point is impossible in the everyday sense, or that an observed measurement cannot equal a particular recorded value. It means that the probability assigned by the continuous model to the exact singleton event \(\{X=x\}\) is zero. Probabilities are assigned to intervals and other sets by integrating the density over them.

Result: If \(X\) has density \(f\), then \(P(X=x)=0\) for every real number \(x\). Consequently, including or excluding either endpoint does not change an interval probability: $$ P(a<X<b)=P(a\leq X\leq b)=\int_a^b f(x)\,dx. $$

Proof. The probability of the singleton \(\{x\}\) is the integral of the density over that set. A singleton has length zero, so its integral is zero: $$ P(X=x)=\int_{\{x\}} f(t)\,dt=0. $$ The events \(\{a\leq X\leq b\}\) and \(\{a<X<b\}\) differ only by the endpoints \(a\) and \(b\). Each endpoint has probability zero, so adding or removing them does not change the probability. The integral over the interval gives the stated value. \(\square\)

Worked Example: A Uniform Response on a Bounded Interval

Let \(X\) be uniformly distributed on \([2,8]\). Its density is \(f(x)=1/6\) for \(2\leq x\leq 8\), and zero elsewhere. Find \(P(3<X<5)\), \(P(X=4)\), and interpret the density height.

The interval probability is the area of a rectangle with height \(1/6\) and width \(5-3=2\): $$ P(3<X<5)=\int_3^5 \frac{1}{6}\,dx =\frac{1}{6}(5-3)=\frac{1}{3}. $$

The point event has probability $$ P(X=4)=\int_{\{4\}} f(x)\,dx=0. $$ The density height at 4 is \(f(4)=1/6\), not \(1/6\) probability at that point. Because \(X\) is measured in the units of the original measurement, this height is expressed in inverse units. The total probability over the full support checks correctly: $$ \int_2^8 \frac{1}{6}\,dx=\frac{1}{6}(8-2)=1. $$

Density Heights as Local Rates of Probability

Although \(f(x)\) is not \(P(X=x)\), a density height does describe how probability accumulates near \(x\). If the density is continuous at \(x\), then for a sufficiently short interval beginning at \(x\), the probability is approximately the density height times the interval width. The approximation improves as the interval shrinks.

Result: Suppose \(X\) has density \(f\), and \(f\) is continuous at \(x\). For \(h>0\), $$ \lim_{h\downarrow 0}\frac{P(x\leq X\leq x+h)}{h}=f(x). $$ Thus \(f(x)h\) approximates the probability of a short interval of width \(h\) near \(x\), when \(f\) changes little across that interval.

Proof. By the interval probability formula, $$ \frac{P(x\leq X\leq x+h)}{h} =\frac{1}{h}\int_x^{x+h} f(t)\,dt. $$ For \(h>0\), continuity at \(x\) implies that the average value of \(f\) across \([x,x+h]\) approaches \(f(x)\). To verify this directly, let \(\varepsilon>0\). By continuity, there is a \(\delta>0\) such that \(|f(t)-f(x)|<\varepsilon\) whenever \(|t-x|<\delta\). For \(0<h<\delta\), $$ \left|\frac{1}{h}\int_x^{x+h}f(t)\,dt-f(x)\right| \leq \frac{1}{h}\int_x^{x+h}|f(t)-f(x)|\,dt \leq \varepsilon. $$ Therefore the average converges to \(f(x)\) as \(h\downarrow0\), proving the result. \(\square\)

The result gives a precise interpretation of density as a local rate of probability per unit of response scale. It does not say that \(f(x)h\) is always the exact probability of an interval of width \(h\). The exact probability is the integral; the product is an approximation unless the density is constant across that interval.

Worked Example: A Normal Measurement and a Point-Probability Error

Suppose \(X\sim N(0,1)\). The standard normal density is $$ f(x)=\frac{1}{\sqrt{2\pi}}\exp\left(-\frac{x^2}{2}\right). $$ Compare the density height at \(x=1\) with the probability \(P(0.5<X<1.5)\).

At \(x=1\), the density height is $$ f(1)=\frac{1}{\sqrt{2\pi}}e^{-1/2}\approx 0.2420. $$ This is not \(P(X=1)\); the latter is zero because the normal distribution is continuous.

For the interval probability, integrate the density, or equivalently use the standard normal cumulative distribution function \(\Phi\): $$ P(0.5<X<1.5)=\Phi(1.5)-\Phi(0.5) \approx 0.9332-0.6915=0.2417. $$ The probability is approximately \(0.2417\). It happens to be numerically close to \(f(1)\), but the quantities are different: the interval has width 1, and the probability is the area under the curve across that interval. If the interval were much narrower, its probability would be much smaller than the density height.

Calculating Probability from the Density

The reliable procedure is to identify the event as a set of response values and integrate the density over that set. For an interval, this can also be calculated using the cumulative distribution function \(F(x)=P(X\leq x)\): $$ P(a<X\leq b)=F(b)-F(a). $$ For a continuous response, endpoint choices do not alter this result. The CDF difference and the integral of the density are two ways of calculating the same interval probability.

Worked Example: An Exponential Response Over a Short Interval

Let \(X\) have exponential density \(f(x)=0.5e^{-0.5x}\) for \(x\geq0\), and density zero for \(x<0\). Find \(P(1<X<1.2)\), then compare it with the short-interval approximation using \(f(1)\).

Integrating gives the exact probability: $$ P(1<X<1.2)=\int_1^{1.2}0.5e^{-0.5x}\,dx =\left[-e^{-0.5x}\right]_1^{1.2} =e^{-0.5}-e^{-0.6}. $$ Using \(e^{-0.5}\approx0.60653\) and \(e^{-0.6}\approx0.54881\), $$ P(1<X<1.2)\approx0.60653-0.54881=0.05772. $$

The density at the left endpoint is $$ f(1)=0.5e^{-0.5}\approx0.30327. $$ The interval width is \(1.2-1=0.2\), so the local approximation is $$ f(1)(0.2)\approx0.30327(0.2)=0.06065. $$ This is close to, but not equal to, the exact probability \(0.05772\). The density decreases over the interval, so using its left-endpoint height across the entire interval slightly overestimates the area.

Common Mistake: Reading a Height as a Probability

A common error is to see, for example, \(f(1)=0.242\) and report \(P(X=1)=0.242\). That reasoning treats the vertical height of the density curve as the probability of a point. It is incorrect: for a continuous distribution, \(P(X=1)=0\), while \(0.242\) is the density height at 1.

The correction is to specify the event and use its area. For instance, the probability of a range such as \(0.9<X<1.1\) is $$ P(0.9<X<1.1)=\int_{0.9}^{1.1} f(x)\,dx. $$ A density value can help approximate this probability by multiplying by the interval width when the density varies little there, but it does not replace the integral for an exact calculation.

Another warning sign is a reported “probability” greater than 1. This is impossible for an event probability, but it can be a valid density height. For a uniform distribution on \([0,0.5]\), the density is 2 on its support; the total probability remains \(2(0.5)=1\). The density height exceeds 1 because the support is narrow, not because the model assigns more than unit probability.

Key takeaway: A density height is probability per unit of response scale. A point has probability zero under a continuous density; an interval has probability equal to the integral of the density over that interval.

Check Your Understanding

Answer each question by distinguishing a density height from an event probability.

  1. If a continuous random variable has density \(f(2)=0.7\), what is \(P(X=2)\), and what does \(0.7\) describe?
  2. A uniform distribution has density 3 on an interval of width \(1/3\). Explain why this is a valid density even though its height exceeds 1.
  3. Write an integral for \(P(4<X\leq 6)\) when \(X\) has density \(f\). Does including the endpoint 4 change the probability?
  4. When is \(f(x)h\) a useful approximation to \(P(x\leq X\leq x+h)\), and what is the exact expression?
  5. Why can the numerical value of a density not generally be interpreted as a probability, even when it lies between 0 and 1?
Clinical Biostats