Mathwords logoMathwords

Probability Density Function — Definition, Formula & Examples

A probability density function (PDF) is a function that describes the relative likelihood of a continuous random variable taking on a particular value. The probability that the variable falls within a specific interval equals the area under the PDF curve over that interval.

For a continuous random variable XX, a probability density function f(x)f(x) satisfies two conditions: f(x)0f(x) \geq 0 for all xx, and f(x)dx=1\int_{-\infty}^{\infty} f(x)\, dx = 1. The probability that XX lies in the interval [a,b][a, b] is given by P(aXb)=abf(x)dxP(a \leq X \leq b) = \int_a^b f(x)\, dx.

Key Formula

P(aXb)=abf(x)dxP(a \leq X \leq b) = \int_a^b f(x)\, dx
Where:
  • f(x)f(x) = The probability density function evaluated at x
  • a,ba, b = The lower and upper bounds of the interval
  • XX = A continuous random variable

How It Works

A PDF assigns a density—not a direct probability—to each value of a continuous random variable. To find the probability that the variable falls between two values, you integrate the PDF over that interval. The total area under the entire curve always equals 1. At any single point, P(X=c)=0P(X = c) = 0, because the integral over a zero-width interval is zero.

Worked Example

Problem: Suppose a continuous random variable X has the PDF f(x) = 3x² for 0 ≤ x ≤ 1, and f(x) = 0 otherwise. Find P(0.5 ≤ X ≤ 1).
Set up the integral: Apply the PDF probability formula over the interval [0.5, 1].
P(0.5X1)=0.513x2dxP(0.5 \leq X \leq 1) = \int_{0.5}^{1} 3x^2\, dx
Evaluate the integral: The antiderivative of 3x² is x³.
[x3]0.51=130.53=10.125=0.875\left[ x^3 \right]_{0.5}^{1} = 1^3 - 0.5^3 = 1 - 0.125 = 0.875
Answer: P(0.5 ≤ X ≤ 1) = 0.875, so there is an 87.5% probability that X falls between 0.5 and 1.

Why It Matters

PDFs underpin the normal distribution, exponential distribution, and virtually every continuous model used in statistics. Engineers use them to model component lifetimes, data scientists use them in Bayesian inference, and economists rely on them to model income distributions.

Common Mistakes

Mistake: Interpreting f(x) at a point as a probability (e.g., claiming P(X = 0.5) = f(0.5)).
Correction: The value f(x) is a density, not a probability. For continuous variables, the probability at a single point is always 0. You must integrate over an interval to obtain a probability.