Skip to main content
Engineering LibreTexts

3.7: The Cumulative Probability Function

  • Page ID
    47979
    • Franz S. Hover & Michael S. Triantafyllou
    • Massachusetts Institute of Technology via MIT OpenCourseWare
    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    The cumulative probability function is closely related to the pdf \( \underline{p}(x) \):

    \begin{align} P(x_o) &= p(x \leq x_o) = \int\limits_{- \infty}^{x_o} \underline{p}(x) \, dx \\[4pt] \underline{p}(x_o) &= \dfrac{dP(x_o)}{dx}. \end{align}

    The probability density function is the derivative of the cumulative probability function. \(P\) is important because it lets us now transform the complete pdf of a random variable into the pdf of a function of the random variable. Let us say \(y = f(x)\); the key idea is that for a monotonic function \(f(x)\) (monotonic means the function is either strictly increasing or strictly decreasing with \(x\)),

    \[ p (x \leq x_o) = p(y \leq y_o = f(x_o)); \]

    these probabilities are the same, although we will see some subtleties to do with multiple values if the function is not monotonic. Here is a first example: let \(y = ax + b\). In the case that \(a > 0\), then

    \begin{align*} ax + b \leq y_o \,\, \textrm{when} \,\, x \leq \dfrac{y_o - b}{a} \longrightarrow \\[4pt] p(y \leq y_o) = \int\limits_{- \infty}^{\frac{y_o - b}{a}} \underline{p}(x) \, dx. \end{align*}

    The case when \(a < 0\) has simply

    \[ p(y \leq y_o) = 1 - \int\limits_{-\infty}^{\frac{y_o - b}{a}} \underline{p}(x) \, dx. \nonumber \]

    All that we have done here is modify the upper limit of integration, to take the function into account. Now suppose that \(y < y_o\) or \(y > y_o\) over several disjoint regions of \(x\). This will be the case if \(f(x)\) is not monotonic. An example is \(y = x^2\), which for a given value of \(y_o\) clearly has two corresponding \(x_o\)’s. We have

    \begin{align*} p(y \geq y_o) \, &= \, p(x \leq - \sqrt{y_o}) + p(x \geq - \sqrt{y_o}), && \text{or equivalently} \\[4pt] p(y \leq y_o) \, &= \, 1 - p(x \leq - \sqrt{y_o}) - p(x \geq \sqrt{y_o}) \end{align*}

    and there is of course no solution if \(y_o < 0\). The use of pdf’s for making these calculations, first in the case of monotonic \(f(x)\), goes like this:

    \begin{align} \underline{p}(y) |dy| \, &= \, \underline{p}(x) |dx|, \\[4pt] \underline{p}(y) \, &= \, \underline{p}(x) / \left| \dfrac{dy}{dx} \right| . \end{align}

    In the case of non-monotonic \(f(x)\), a given value of \(y\) corresponds with \(x_1, \, ... \, , \, x_n\). The correct extension of the above is

    \[ \underline{p}(y) = \underline{p}(x_1) / \left| \dfrac{dy(x_1)}{dx} \right| + \, ... \, + \, \underline{p}(x_n) / \left| \dfrac{dy(x_n)}{dx} \right| . \]

    Here is a more detailed example. Consider the Gaussian or normal distribution \(N(0, \sigma^2)\):

    \[ \underline{p}(x) = \dfrac{1}{\sigma \sqrt{2 \pi}} e^{-x^2 / 2 \sigma^2} , \]

    and let \(y = ax^2\). For a given (positive) \(y\), there are two solutions for \(x\):

    \[ x_1 = - \sqrt{ \dfrac{y}{a} } , \, x_2 = \sqrt{ \dfrac{y}{a} }. \]

    Graphs of the function y=a x^2, and of the pdfs of the x and of the y values of this function.
    Figure \(\PageIndex{1}\): Graph of the function \(y=ax^2\) from the example problem above (center). Graphs of the probability density functions of the \(x\) values and of the \(y\) values of \(y=ax^2\) (left and right, respectively).

    Now \(dy/dx = 2ax\) so that

    \begin{align*} \left| \dfrac{dy(x_1)}{dx} \right| &= \left| \dfrac{dy(x_2)}{dx} \right| = 2a|x| = 2a \sqrt{\dfrac{y}{a}} = 2 \sqrt{ay} \longrightarrow \\[4pt] \underline{p}(y) &= \underline{p}(x_1) / \left| \dfrac{dy(x_1)}{dx_1} \right| + \underline{p}(x_2) / \left| \dfrac{dy(x_2)}{dx_2} \right| \\[4pt] &= \dfrac{1}{\sigma \sqrt{2 \pi}} \left\{ \dfrac{1}{2 \sqrt{ay}} e^{-y/2a \sigma^2} + \textrm{same} \right\}, && \text{giving finally} \\[4pt] &= \dfrac{1}{\sigma \sqrt{2 \pi ay}} e^{-y/2 \sigma^2 a}. \end{align*}


    This page titled 3.7: The Cumulative Probability Function is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by Franz S. Hover & Michael S. Triantafyllou (MIT OpenCourseWare) via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.