Skip to content

Probability Density Function

Definition

A probability density function of an absolutely continuous XX is a nonnegative integrable function satisfying

P(X∈A)=∫AfX(x) dx,∫RfX(x) dx=1.\begin{gathered} \mathbb{P}(X\in A)=\int_Af_X(x)\,\mathrm{d}x,\\ \int_{\mathbb{R}}f_X(x)\,\mathrm{d}x=1. \end{gathered}

Densities that agree except possibly on a set of zero length, for example at finitely many points, describe the same distribution. This qualification is called almost everywhere here: values on the exceptional set do not affect the integrals. It does not require two densities to agree at every point.


Interpretation

A density describes how probability is spread over the real line: probabilities are areas under its graph, not heights.

A density curve with the area between a and b shaded, equal to the probability that X lies between a and b.

The shaded region between aa and bb has area ∫abfX(x) dx=P(a≤X≤b)\int_a^bf_X(x)\,\mathrm{d}x=\mathbb{P}(a\le X\le b), the first formula of the Definition with A=[a,b]A=[a,b], and the whole area under the curve is 11. Moving bb to the right adds the area of a thin strip. A strip of zero width has zero area, so P(X=a)=0\mathbb{P}(X=a)=0 and it does not matter whether the endpoints are included.

Probabilities are areas under the density. The narrow uniform density reaches height 22, which is fine: only areas, never heights, are probabilities.

The height fX(x)f_X(x) is probability per unit length. For a short interval of length hh starting at a point xx where fXf_X is continuous, P(x<X≤x+h)≈fX(x) h\mathbb{P}(x<X\le x+h)\approx f_X(x)\,h. This is why a height above 11 is allowed, as for the uniform density of height 22 on (0,12)(0,\tfrac{1}{2}), and why changing fXf_X at finitely many points changes no probability: no area changes. The definite integral measures these areas; for the piecewise continuous densities in the examples, Riemann integral calculations evaluate them.

For a continuous random variable the density plays the role that the PMF plays for a discrete one, with sums replaced by integrals. Integrating the density up to xx gives the CDF, and by the fundamental theorem of calculus differentiating the CDF gives back fX(x)f_X(x) at every point where fXf_X is continuous. Density height itself is never a point probability.


Key Results

  • P(a<X≤b)=∫abfX(x) dx\mathbb{P}(a<X\le b)=\int_a^bf_X(x)\,\mathrm{d}x.
  • FX(x)=∫−∞xfX(t) dtF_X(x)=\int_{-\infty}^xf_X(t)\,\mathrm{d}t, so FX′=fXF_X'=f_X except possibly on a set of zero length.

Examples

  • For fX(x)=2xf_X(x)=2x on (0,1)(0,1) and zero elsewhere, P(X≤1/2)=1/4\mathbb{P}(X\le1/2)=1/4.
  • The uniform density on (0,1/2)(0,1/2) has height 22, total area 11, and P(X=1/4)=0\mathbb{P}(X=1/4)=0.

Prerequisites

Sources

Aliases: PDF, density function, probability density, p.d.f. Keywords: density Symbols: element of, infinity, integral, real numbers

Last updated: 20 October 2026 03:02