Probability density function
A probability density function (PDF) is a curve for a continuous variable. The area under the curve between two values is the probability of landing between them. The total area is 1. The chance of any exact single value is 0.
Last updated
Analogy
Think of a map of rain on a field. The depth at one point is a density, but only a patch of ground collects a measurable amount.
Example
Variable between 0 and 10Curve height = 1/10Area from 2 to 5 = 3 x 0.1 = 0.3P(2 < X < 5) = 0.3P(X = 4) = 0
In practice
Weights, times and temperatures are modelled with density curves instead of tables of probabilities.
Practice
Flashcards
- What does the area under a PDF between a and b give?The probability that the variable lies between a and b.
Interview questions
- Why is the probability that a continuous variable equals exactly one value equal to zero, and how do we answer questions instead?
- Probability is area under the density
- A single point has no width
- Ask about intervals
- Use the CDF for at most questions
Questions people ask
Why is the probability of an exact value zero for a continuous variable?
There are infinitely many possible values, so a single point has no width and no area under the curve. The chance of a weight being exactly 70.0000 kg is zero. We ask about intervals instead, such as between 69.5 and 70.5 kg.
What is the difference between a PDF and a probability?
The height of a PDF is a density, not a probability, and it can even exceed 1. Only the area under the curve over an interval is a probability. Density tells you where values are crowded, area tells you how likely they are.