2.1 Probability functions for continuous random variables
For continuous random variables, the probability function is called a probability density function (PDF).
Example 2.1 (Probability density function) A rv X has the uniform continuous distribution defined from a to b if the PDF is fX(x)={1b−aif a<x<b;0otherwise. This is usually written, for convenience, as fX(x)=1b−afor a<x<b.
A PDF, say fX(x) (or just f(x) when there is no ambiguity), has two properties:
- ∫∞−∞fX(x)dx=1; that is, the total probability is one (in other words, x certainly must take some value).
- fX(x)≥0 for all x; that is, probabilities are non-negative.
Probabilities for continuous rvs are found by integrating over an appropriate area.
Example 2.2 (Uniform continuous distribution) A rv X has the uniform continuous distribution
defined from 50 to 60
if the PDF is
fX(x)=160−50=110for 50<x<60;
see Fig. 2.1 (left panel).
The probability that the X takes a value between 50 and 55 is
Pr
see
Fig. 2.1 (right panel).
Note that the probability of observing
any value exactly is zero since X is continuous.

FIGURE 2.1: Left panel: A continuous uniform distribution defined for 50<x<60. Right panel: Displaying the probability that the value of X is between 50 and 55.
Example 2.3 (PDF: Continuous rv) Consider a rv Z with PDF f_Z(z) = 3 z^2\quad\text{for $0<z<1$}. The probability that z>0.5 is \Pr(Z>0.5) = 3 \int_{1/2}^{1} z^2 \, dz = z^3 \bigg\rvert_{z=1/2}^{z=1} = 1 - \frac{1}{8} = \frac{7}{8}; see Fig.2.2.

FIGURE 2.2: The PDF for the rv Z
Note that for X continuous:
- \Pr(X=x) = 0 for all values of x.
- Hence, \Pr(a < X < b) = \Pr( a \le X < b) = \Pr(a < X \le b) = \Pr(a\le X\le b).