Skip to content

probability density

A probability density function describes the distribution of a continuous random variable.

If X is continuous, its PDF is a function f(x) such that:

  • f(x) \ge 0 for all x
  • The area under the curve is 1:
    \int_{-\infty}^{\infty} f(x)\,dx = 1

The key idea

For continuous variables:

The PDF is not a probability. Probability comes from the area under the PDF curve.

This is the biggest difference from a PMF.

⭐ Probability from a PDF

To find the probability that X falls in an interval [a, b]:

P(a \le X \le b) = \int_a^b f(x)\,dx

And:

P(X = x) = 0

because a single point has no area.

⭐ Examples

Example 1: Uniform Distribution on [0, 1]

f(x) = \begin{cases} 1, & 0 \le x \le 1 , & otherwise \end{cases}

  • The height is 1
  • The width is 1
  • Area = 1 → valid PDF

Probability that X is between 0.2 and 0.5:

P(0.2 \le X \le 0.5) = \int_{0.2}^{0.5} 1\,dx = 0.3

Example 2: Normal Distribution

A normal distribution with mean \mu and standard deviation \sigma has PDF:

f(x) = \frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{(x-\mu)^2}{2\sigma^2}}

This curve is the famous bell shape.

Example:
Let X \sim N(0,1).
Probability that X is between –1 and 1:

P(-1 \le X \le 1) \approx 0.68

(From the 68–95–99.7 rule.)

Example 3: Exponential Distribution

Let X be the waiting time until the next bus, with rate \lambda = 2.

PDF:

f(x) = \begin{cases}2e^{-2x},  x \ge 0 , & x < 0\end{cases}

Probability the wait is less than 1 minute:

P(X < 1) = \int_0^1 2e^{-2x}\,dx = 1 - e^{-2} \approx 0.865

⭐ PDF vs PMF (Quick Comparison)

FeaturePMFPDF
ForDiscrete variablesContinuous variables
GivesP(X = x)Density, not probability
Probability of exact valuePositiveAlways 0
Probability of intervalSum of PMF valuesArea under PDF

🎨 Intuition

A PDF is like a smooth landscape.
You don’t look at the height of the land to get probability — you look at the area under the curve.

Leave a Reply

error: Content is protected !!