Probability – How Can a Probability Density Function (pdf) Be Greater Than 1?

density functionprobabilitystatistics

The PDF describes the probability of a random variable to take on a given value:

$f(x)=P(X=x)$

My question is whether this value can become greater than $1$?

Quote from wikipedia:

"Unlike a probability, a probability density function can take on values greater than one; for example, the uniform distribution on the interval $[0, \frac12]$ has probability density $f(x) = 2$ for $0 \leq x \leq \frac12$ and $f(x) = 0$ elsewhere."

This wasn't clear to me, unfortunately. The question has been asked/answered here before, yet used the same example. Would anyone be able to explain it in a simple manner (using a real-life example, etc)?

Original question:

"$X$ is a continuous random variable with probability density function $f$. Answer with either True or False.

  • $f(x)$ can never exceed $1$."

Thank you!

EDIT: Resolved.

Best Answer

Discrete and continuous random variables are not defined the same way. Human mind is used to have discrete random variables (example: for a fair coin, -1 if it the coin shows tail, +1 if it's head, we have that $f(-1)=f(1)=\frac12$ and $f(x)=0$ elsewhere). As long as the probabilities of the results of a discrete random variable sums up to 1, it's ok, so they have to be at most 1.

For a continuous random variable, the necessary condition is that $\int_{\mathbb{R}} f(x)dx=1$. Since an integral behaves differently than a sum, it's possible that $f(x)>1$ on a small interval (but the length of this interval shall not exceed 1).

The definition of $\mathbb{P}(X=x)$is not $\mathbb{P}(X=x)=f(x)$ but more $\mathbb{P}(X=x)=\mathbb{P}(X\leq x)-\mathbb{P}(X<x)=F(x)-F(x^-)$. In a discrete random variable, $F(x^-)\not = F(x)$ so $\mathbb{P}(X=x)>0$. However, in the case of a continuous random variable, $F(x^-)=F(x)$ (by the definition of continuity) so $\mathbb{P}(X=x)=0$. This can be seen as the probability of choosing $\frac12$ while choosing a number between 0 and 1 is zero.

In summary, for continuous random variables $\mathbb{P}(X=x)\not= f(x)$.

Related Question