Recall that continuous random variables have uncountably many possible values (think of intervals of real numbers). Just as for discrete random variables, we can talk about probabilities for continuous random variables using *density functions*.

The first three conditions in the definition state the properties necessary for a function to be a *valid pdf* for a continuous random variable. The fourth condition tells us how to use a pdf to calculate probabilities for continuous random variables, which are given by *integrals* the continuous analog to sums.

### Example \(\PageIndex{1}\)

Let the random variable \(X\) denote the time a person waits for an elevator to arrive. Suppose the longest one would need to wait for the elevator is 2 minutes, so that the possible values of \(X\) (in minutes) are given by the interval \([0,2]\). A possible pdf for \(X\) is given by

$$f(x) = \left\{\begin{array}{l l}

x, & \text{for}\ 0\leq x\leq 1 \\

2-x, & \text{for}\ 1< x\leq 2 \\

0, & \text{otherwise}

\end{array}\right.\notag$$

The graph of \(f\) is given below, and we verify that \(f\) satisfies the first three conditions in Definition 4.1.1:

- From the graph, it is clear that \(f(x) \geq 0\), for all \(x \in \mathbb{R}\).
- Since there are no holes, jumps, asymptotes, we see that \(f(x)\) is (piecewise) continuous.
- Finally we compute:

$$\int\limits^{\infty}_{-\infty}\! f(x)\,dx = \int\limits^{2}_0\! x\,dx = \int\limits^1_0\! x\,dx + \int\limits^2_1\! (2-x)\,dx = 1\notag$$

Figure 1: Graph of pdf for \(X\), \(f(x)\)

So, if we wish to calculate the probability that a person waits less than 30 seconds (or 0.5 minutes) for the elevator to arrive, then we calculate the following probability using the pdf and the fourth property in Definition 4.1.1:

$$P(0\leq X\leq 0.5) = \int\limits^{0.5}_0\! f(x)\,dx = \int\limits^{0.5}_0\! x\,dx = 0.125\notag$$

Note that, unlike discrete random variables, continuous random variables have *zero point probabilities*, i.e., the probability that a continuous random variable equals a single value is always given by 0. Formally, this follows from properties of integrals:

$$P(X=a) = P(a\leq X\leq a) = \int\limits^a_a\! f(x)\, dx = 0.\notag$$

Informally, if we realize that **probability for a continuous random variable is given by areas under pdf's**, then, since there is no area in a line, there is no probability assigned to a random variable taking on a single value. This does not mean that a continuous random variable will never equal a single value, only that we do not assign any probability to single values for the random variable. For this reason, we only talk about the probability of a continuous random variable taking a value in an INTERVAL, not at a point. And whether or not the endpoints of the interval are included does not affect the probability. In fact, the following probabilities are all equal:

$$P(a\leq X\leq b) = P(a<X<b) = P(a\leq X< b) = P(a< X \leq b) = \int\limits^b_a\!f(x)\,dx\notag$$