Skip to content
Statistics

What is a probability density function?

A function that describes a continuous random variable: the probability of landing in an interval is the area under the curve over that interval. Its value at a point is a density, not a probability, so it can exceed 1. The cumulative distribution function (CDF) gives P(X ≤ x).

datasciencetrivia.com

Card 1 of 244. Answer: A function that describes a continuous random variable: the probability of landing in an interval is the area under the curve over that interval. Its value at a point is a density, not a probability, so it can exceed 1. The cumulative distribution function (CDF) gives P(X ≤ x).

Created by santiviquez

About · Quizzes · History of AI · To suggest new questions or report an error send me a dm.

The longer answer

For a continuous variable, P(a ≤ X ≤ b) is the integral of the density f(x) from a to b, and the total area under f is 1. The probability of any exact value is 0. The CDF, F(x) = P(X ≤ x), is the running area under the density, and the density is the CDF's derivative. Discrete variables use a probability mass function instead, where each value has a real probability.

Example: a uniform distribution on [0, 0.5] has density 2 across that interval. The curve sits above 1, yet the area is 0.5 × 2 = 1. For a standard normal the density at 0 is about 0.399, and P(−1.96 ≤ Z ≤ 1.96) = F(1.96) − F(−1.96) ≈ 0.95, which is where the 1.96 in 95% confidence intervals comes from.

In machine learning, the likelihood of continuous data is a product of densities, kernel density estimation estimates a density from samples, and generative models such as normalizing flows learn one. Common follow-ups: why P(X = x) is 0 for a continuous variable, and how to sample from any distribution by feeding uniform random numbers through the inverse of its CDF (inverse transform sampling).

All questions