Skip to main content
Statistics LibreTexts

4.2: Cumulative Distribution Functions (CDFs) for Continuous Random Variables

  • Page ID
    3266
  • 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 don't 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.

    Recall Definition 3.3.1, the definition of the cdf, which applies to both discrete and continuous random variables. For continuous random variables we can further specify how to calculate the cdf with a formula as follows. Let \(X\) have pdf \(f\), then the cdf \(F\) is given by
    $$F(x) = P(X\leq x) = \int\limits^x_{-\infty}\! f(t)\, dt, \quad\text{for}\ x\in\mathbb{R}.\notag$$
    In other words, the cdf for a continuous random variable is found by integrating the pdf. Note that the Fundamental Theorem of Calculus implies that the pdf of a continuous random variable can be found by differentiating the cdf. This relationship between the pdf and cdf for a continuous random variable is incredibly useful.

    Relationship between pdf and cdf for a continuous random variable: Let \(X\) be a continuous random variable with pdf \(f\) and cdf \(F\).

    • By definition, the cdf is found by integrating the pdf:\( \displaystyle{F(x) = \int\limits^x_{-\infty}\! f(t)\, dt}\)
    • By the Fundamental Theorem of Calculus, the pdf can be found by differentiating the cdf: \(\displaystyle{f(x) = \frac{d}{dx}\left[F(x)\right]}\)

    Example \(\PageIndex{1}\):

    Continuing in the context of Example 17, we find the corresponding cdf. First, let's find the cdf at two possible values of \(X\), \(x=0.5\) and \(x=1.5\):
    \begin{align*}
    F(0.5) &= \int\limits^{0.5}_{-\infty}\! f(t)\, dt = \int\limits^{0.5}_0\! t\, dt = \frac{t^2}{2}\bigg|^{0.5}_0 = 0.125 \\
    F(1.5) &= \int\limits^{1.5}_{-\infty}\! f(t)\, dt = \int\limits^{1}_0\! t\, dt + \int\limits^{1.5}_1 (2-t)\, dt = \frac{t^2}{2}\bigg|^{1}_0 + \left(2t - \frac{t^2}{2}\right)\bigg|^{1.5}_1 = 0.5 + (1.875-1.5) = 0.875
    \end{align*}
    Now we find \(F(x)\) more generally, working over the intervals that \(f(x)\) has different formulas:
    \begin{align*}
    \text{for}\ x<0: \quad F(x) &= \int\limits^x_{-\infty}\! 0\, dt = 0 \\
    \text{for}\ 0\leq x\leq 1: \quad F(x) &= \int\limits^{x}_{0}\! t\, dt = \frac{t^2}{2}\bigg|^x_0 = \frac{x^2}{2} \\
    \text{for}\ 1<x\leq2: \quad F(x) &= \int\limits^{1}_0\! t\, dt + \int\limits^{x}_1 (2-t)\, dt = \frac{t^2}{2}\bigg|^{1}_0 + \left(2t - \frac{t^2}{2}\right)\bigg|^x_1 = 0.5 + \left(2x - \frac{x^2}{2}\right) - (2 - 0.5) = 2x - \frac{x^2}{2} - 1 \\
    \text{for}\ x>2: \quad F(x) &= \int\limits^x_{-\infty}\! f(t)\, dt = 1
    \end{align*}
    Putting this altogether, we write \(F\) as a piecewise function and Figure 2 gives its graph:
    $$F(x) = \left\{\begin{array}{l l}
    0, & \text{for}\ x<0 \\
    \frac{x^2}{2}, & \text{for}\ 0\leq x \leq 1 \\
    2x - \frac{x^2}{2} - 1, & \text{for}\ 1< x\leq 2 \\
    1, & \text{for}\ x>2
    \end{array}\right.\notag$$

    Screen Shot 2019-02-24 at 11.10.35 PM.png

    Figure 2: Graph of cdf in Example 4.2.1

    Recall that the graph of the cdf for a discrete random variable is always a step function. Looking at Figure 2 above, we note that the cdf for a continuous random variable is always a continuous function.


    In the next two sections, we look at two common continuous distributions. There is a list of other common continuous distributions in section 4.7.