A probability density function (commonly abbreviated pdf) describes how probability is assigned across the possible values of a continuous random variable. Informally, a pdf is a nonnegative function f(x) whose integral over any interval gives the probability that the variable falls in that interval. The total integral of f over its domain equals 1, which enforces that some outcome occurs. Unlike discrete probabilities, a pdf does not give probability at single points; instead probabilities of precise values are zero and only integrals over ranges are meaningful.

Definition and basic properties

Formally, for a continuous distribution with pdf f(x) the cumulative distribution function (cdf) is defined by F(x) = \int_{-\infty}^{x} f(t)\,dt. For any real numbers a < b, P(a \le X \le b) = \int_{a}^{b} f(x)\,dx. Important properties are: f(x) \ge 0 for all x; \int_{-\infty}^{\infty} f(x)\,dx = 1; the pdf may be zero outside its support and may take values greater than 1 provided the integral remains 1. The pdf is determined only up to changes on sets of measure zero.

Uses and calculations

Dense functions are central to computing expectations and moments: the expected value of X is E[X] = \int x f(x)\,dx and variance is Var(X) = \int (x - E[X])^2 f(x)\,dx. Pdfs appear in likelihood functions for parameter estimation, in Bayesian posterior densities, and in nonparametric methods such as kernel density estimation. Conditional and joint pdfs extend the idea to multivariate settings and form the basis of continuous statistical modelling in statistics.

Examples and common families

  • Uniform: constant density on a finite interval; every subinterval of equal length has equal probability.
  • Normal (Gaussian): bell-shaped, defined on the whole real line; characterized by mean and variance and widely used in practice.
  • Exponential: positive support with a decreasing density, often used for waiting times and lifetimes.

These examples illustrate different shapes and supports a pdf can have. Many other families (gamma, beta, t, etc.) model skewness, heavy tails, or bounded ranges.

Distinctions and notable facts

A pdf differs from a probability mass function (pmf) used for discrete variables: a pmf assigns probability to individual outcomes, while a pdf assigns density per unit length. In some real-world models a distribution is mixed, containing both a pdf part and discrete atoms. Computation of probabilities always involves the integral of the pdf. For further reading on related definitions and rigorous measure-theoretic foundations see introductory texts and reference articles on probability distributions and on the distinction between continuous and discrete models in probability theory (continuous models).

Historically the formal use of densities grew as calculus and probability theory matured in the 18th and 19th centuries. Modern treatments emphasize the role of measure theory in defining densities and expectations. To explore applications and computational methods, consult resources on statistical inference and density estimation techniques (probability, statistics, random variable, function).

Related topics include joint and marginal pdfs for multivariate variables, transformation of variables (change-of-variable formula), and numerical integration methods for evaluating probabilities when closed-form integrals are unavailable.