The probability density function ("PDF") describes the probability law of a continuous [[Random Variable]].
Unlike a [[Probability Mass Function]], the PDF does not give the probability that the r.v. $X$ takes on a specific value $x$ (since the probability of any single point is zero). Instead, it specifies the *probability density*, which is the *probability per unit length* at $x$.
To compute a probability, we calculate the area under the "curve" over a range $[a,b]$. We need an integral for that.
$ \mathbf P(a \le x \le b) = \int_a^b f_X(x) \, dx $
![[probability-density.png|center|400]]
Probabilities of small intervals can be approximated by calculating the area of a rectangle:
![[probability-density-small-interval.png|center|300]]
The [[Probability Axioms#Axioms|probability axioms]] for single probabilities have to hold for a PDF as well:
* *Non negativity:*
$f_X(x) \ge 0$
* *Normalization:*
$ \int_{-\infty}^\infty f_X(x) \, dx=1
$
**Key Properties:**
1. Probabilities of single points are always $0$.
$
\begin{align}
\mathbf P(b \le X \le b+\delta)&= f_X(x)*\delta \\
\mathbf P(b \le X \le b+0)&= f_X(x)*0 \\
\mathbf P(b)&=0
\end{align}
$
2. It does not matter if a range $[a,b]$ includes or excludes the thresholds.
$
\begin{align}
\mathbf P(a \le X \le b)&= \overbrace{\mathbf P(X=a)}^{0}+ \overbrace{\mathbf P(X=b)}^{0}+ \mathbf P(a<X<b) \\
\mathbf P(a \le X \le b) &= \mathbf P(a<X<b)
\end{align}
$