A probability density function (PDF) is a nonnegative function that represents the probability distribution of an absolutely continuous random variable. Its integral over a region gives the probability that the variable falls within that region. Unlike a probability assigned to an individual outcome, a density describes how probability is distributed relative to length, area, or a more general reference measure. For a real-valued variable, probabilities correspond to areas under the density curve, not to the curve’s height at individual points. (online.stat.psu.edu)
Definition and interpretation
For a variable taking values among the real numbers, a PDF satisfies
For every measurable set ,
In particular,
Nonnegativity ensures that event probabilities cannot be negative; normalization ensures that the entire range has probability one. (online.stat.psu.edu)
A density value is not itself a probability and may exceed one. For example, a uniform distribution on has density throughout that interval and zero elsewhere. Its total area is nevertheless one. If has a PDF, then for every individual , so including or excluding an interval’s endpoints does not change its probability. This distinguishes a PDF from a probability mass function, which assigns probabilities directly to discrete outcomes. (online.stat.psu.edu)
Where is continuous, a short interval has probability approximately
Consequently, density has units reciprocal to those of the variable: if is measured in meters, its density is measured in inverse meters. Changing measurement units changes density heights while preserving corresponding event probabilities. (live.ocw.mit.edu)
Relationship to the cumulative distribution function
The cumulative distribution function (CDF) is
For a variable possessing a PDF,
Thus . The CDF records accumulated probability, whereas the PDF records its local density. Every real-valued probability distribution has a CDF, but not every distribution has an ordinary PDF. (online.stat.psu.edu)
The connection with calculus is expressed by
almost everywhere. At points where the density is continuous, this follows directly from the fundamental theorem of calculus. A PDF need not itself be continuous, and changing its values on a set of length zero does not alter the distribution. Accordingly, different pointwise functions can represent the same density. (live.ocw.mit.edu)
Mathematical existence
In measure theory, a distribution has a PDF with respect to Lebesgue measure precisely when it is absolutely continuous with respect to that measure. This means that every set of Lebesgue measure zero also has probability zero. The PDF is then the Radon–Nikodym derivative
where is the distribution of and is Lebesgue measure. It is uniquely determined up to changes on sets of measure zero. (live.ocw.mit.edu)
A continuous CDF alone does not guarantee a PDF: singular distributions can have no point masses yet concentrate their probability on a set of length zero. Similarly, a mixed distribution containing both point masses and an absolutely continuous component cannot be represented entirely by an ordinary Lebesgue density. Densities relative to other reference measures provide a broader framework. (live.ocw.mit.edu)
Examples and numerical characteristics
The normal distribution has density
Here is the mean and the standard deviation. Its density is bell-shaped, symmetric about , and positive on the entire real line. (itl.nist.gov)
Densities also determine expected values. For a measurable function , when the expectation exists,
Taking gives the mean. If the second moment is finite, the variance is
These formulas weight each value by its probability density rather than by a discrete probability mass. (online.stat.psu.edu)
Joint densities and transformations
A joint probability distribution of and may have a density . Probabilities are then double integrals over regions. Integrating out gives the marginal density
Where , the conditional density is
Statistical independence holds exactly when the joint density factors into the product of its marginal densities almost everywhere. (online.stat.psu.edu)
Densities change under transformations. If , with invertible and its inverse differentiable,
The absolute derivative compensates for stretching or compressing intervals. For transformations with multiple inverse branches, their contributions are added wherever the change-of-variable formula applies. (online.stat.psu.edu)
Role in statistical inference
In statistics, a parametric density specifies a model indexed by parameters . For independent observations , the likelihood function is
Maximum likelihood estimation selects parameter values maximizing this expression. The same formula has different interpretations: as a density it varies over possible observations with parameters fixed; as a likelihood it varies over parameters with observations fixed. It is not the probability of observing an exact continuous sample. (itl.nist.gov)