Probability Density Function

A probability density function (pdf) describes how probability is spread over the values of a continuous random variable, and it is defined by the rule that the probability of the variable landing in any interval equals the area under the density curve over that interval. The function f(x) is never negative, and the total area under the whole curve is exactly 1. The bell-shaped normal curve, the flat line of the uniform distribution, and the falling curve of the exponential distribution are all density functions. Where a probability mass function assigns probability to individual values, the pdf must work differently, because a continuous variable has infinitely many possible values and cannot give each one a positive share.

The height of a pdf at a point is not a probability, and for a continuous variable the probability of any single exact value is zero. The chance that a person is exactly 170.000... centimeters tall, with unlimited precision, is zero, since a single point has no width and therefore no area. What is meaningful is the probability of an interval, P(a ≤ X ≤ b), which is the integral of the density from a to b. The height f(x) instead measures how concentrated probability is near x: multiplied by a small width dx it gives approximately the probability of landing in that sliver. Because of this, endpoints do not matter for continuous variables, so P(X ≤ b) and P(X < b) are the same number.

Probability density function: area is probability, height is not probabilities come from areas under the curve; the total area is always 1 Standard normal density -2 -1 0 1 2 area = 0.683 P(-1 ≤ Z ≤ 1) P(Z = exactly 0.5) = 0: a single point has no width, so no area Density can exceed 1 height 2 00.51 width 0.5 × height 2 area = 0.5 × 2 = 1, a valid density uniform on the interval from 0 to 0.5 height 2 is not a probability of 2

Because density is probability per unit of x, it can legitimately exceed 1, which is the clearest sign that it is not a probability. A variable uniformly distributed over the interval from 0 to 0.5 has a constant density of 2 on that interval, since the area (width times height) must equal 1, and a very narrow normal distribution has a peak far above 1. The units also carry through: if x is measured in meters, the density is in probability per meter, so changing from meters to centimeters rescales its values by a factor of 100. This is why comparing the heights of two densities means something only when both are in the same units, and why a bar in a density histogram is scaled to have area, not height, equal to its relative frequency.

Heights ~ normal, mean 170 cm, SD 10 cm
a density curve; the area under it totals 1
Turn an interval into an area
Standardize 160 and 180
z = -1 and z = +1
Area between them
about 0.683 of the total
P(160 cm to 180 cm) is about 68%
the probability is the area, not the curve height
P(height is exactly 170 cm) = 0
even at the peak: the height of the curve is density, not a probability

The pdf is linked to the cumulative distribution function by calculus: the pdf is the derivative of the CDF, and the CDF is the running area under the pdf. Given a density, the probability of any interval comes from the difference of two CDF values, which is how the standard normal table works. Summaries follow by integration: the mean is the integral of x times f(x), and the variance is the integral of squared deviations times f(x). The pdf of the normal distribution, written with Gauss's name attached since his early 19th-century work on measurement errors, is the most famous example, and a transformed variable's density is obtained by a change-of-variables rule that includes a scaling (Jacobian) factor, a step that is easy to forget.

In practice densities are rarely known in advance, so they are estimated from data, and many modern methods are built on them. Histograms are the simplest density estimate, and kernel density estimation, developed by Murray Rosenblatt in 1956 and Emanuel Parzen in 1962, smooths each data point into a small bump and adds them up, with the bandwidth controlling the trade-off between a jagged curve and an over-smoothed one. Maximum likelihood estimation maximizes the density evaluated at the observed data; generative models such as Gaussian mixtures, normalizing flows and diffusion models represent or sample from complicated densities; and anomaly detection flags points that fall in regions of very low estimated density. Bayesian analysis likewise expresses prior and posterior beliefs about a parameter as densities.

Common errors include reading curve height as probability, forgetting that the area must be 1, and mixing up a density with a histogram or a pmf. A density of 3.2 at some point is not a 320 percent chance; it is only meaningful through integration. Not every function qualifies: any candidate must be non-negative and integrate to 1, and multiplying by a normalizing constant is how that condition is met. A pdf value can also be misleading for mixed distributions, such as insurance claims with a point mass at zero plus a continuous part, which need both a mass and a density. Finally, a kernel density estimate can show spurious bumps if its bandwidth is too small, and can spill probability beyond a hard boundary such as zero if it is not corrected.

Read a probability density function as a landscape of probability concentration: its height tells where values are crowded, only the area beneath it over an interval is a probability, and that area totals exactly 1, which is why single points carry zero probability and why a density can happily rise above 1.

Take probability density function further

Ask the copilot about this term, or have our engineers assess it against your process.