Skip to main content
Mathematics LibreTexts

7.1: Continuous Random Variables

  • Page ID
    105841
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \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}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \(\newcommand{\longvect}{\overrightarrow}\)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Section 1: Introduction to Continuous Random Variables

    Previously, we introduced a new framework, which is built around the concept of a random variable. We already discussed the discrete random variables. Let’s summarize everything we know about discrete random variables and see what can be used for studying continuous random variables:

    1. Every discrete random variable \(X\) has the probability distribution table and the probability histogram.
    2. Using the probability distribution table or histogram we can find the probabilities of events that are in the form of an inequality that involves \(X\).
    3. Also, we are able to find and interpret the mean and standard deviation of a discrete random variable.
    Definition: Continuous random variable

    A continuous random variable is a random variable whose all possible values form an interval.

    Example \(\PageIndex{1.1}\)

    For example, the following variables are continuous:

    • The income of a randomly selected household;
    • The lifetime of a randomly selected machinery, etc.
    • The wait time in a drive-through of a randomly selected customer;
    • The incubation period of a virus for a randomly selected patient, and there are many others.
    Try It Yourself! \(\PageIndex{1.1}\)

    We want to be able to answer the same questions about ANY continuous random variable. But right away we run into a problem. The fact that it is impossible to list all values of a continuous random variable makes it impossible to construct a probability distribution table, so instead, we are going to focus on its visual representation. An analog of a histogram for a continuous random variable is a probability density curve.

    Definition: Probability density curve

    A probability density curve is a curve that has the following properties:

    1. always above or on the horizontal axis;
    2. the total area under the curve is equal to 1.
    Example \(\PageIndex{1.2}\)

    Determine if a curve is a probability density curve or not.

    • \(y=2-\frac{1}{2}x^2, 0\leq{x}\leq3\) is not a probability density curve;
    • \(y=\frac{1}{4}, -1\leq{x}\leq3\) is a probability density curve;
    • \(x^2+y^2=1, y\geq{0}\) is not a probability density curve;
    • \(y=\frac{1}{8}x, 0\leq{x}\leq4\) is a probability density curve.
    Definition:

    We say that a continuous random variable \(X\) has a given probability density curve \(f(x)\) if the probability that \(X\) is between \(a\) and \(b\), i.e., \(P(a\leq{X}\leq{b})\), is equal to the area under \(f(x)\) between \(a\) and \(b\) for any \(a\), \(b\).

    clipboard_ee781937c23d60238216a4e23d1c6fba0.png

    Notation: \(X \sim f(x)\) means “\(X\) has the probability density curve \(f(x)\)”.

    In other words, if \(X\) has the probability density curve \(f(x)\) the probability that \(X\) is between \(a\) and \(b\) is equal to the area under the curve between \(a\) and \(b\) for any \(a\), \(b\).

    In general, it is not always possible to find the mean and standard deviation of a continuous random variable, but when it is possible, we interpret the numbers the same way as for discrete random variables.

    Section 2: Probability Rules

    For a continuous random variable \(X\), in addition to the total probability under the curve being equal to 1:

    1. The inequality doesn’t matter:

    \(P(X\leq{c})=P(X<c)\)

    \(P(X\geq{c})=P(X>c)\)

    1. The complementary rule:

    \(P(X<c)+P(X>c)=1\)

    1. The subdivision rule:

    \(P(a<X<b)=P(X<b)-P(X<a)\)

    We derived the probability rules in the context of continuous random variables. It is easy to notice that with a few nuances these rules are the same as the ones derived for discrete random variables.

    Try It Yourself! \(\PageIndex{2.1.1}\)
    Try It Yourself! \(\PageIndex{2.1.2}\)
    Try It Yourself! \(\PageIndex{2.2.1}\)
    Try It Yourself! \(\PageIndex{2.2.2}\)
    Try It Yourself! \(\PageIndex{2.3.1}\)
    Try It Yourself! \(\PageIndex{2.3.2}\)

    Section 3: Probability as Areas

    We will consider an example of a continuous random variable and practice some skills.

    Let \(X\) be a continuous random variable with the probability density curve described by the graph of a linear function on the interval from \(0\) to \(4\):

    \(X \sim f(x)=\frac{1}{8}x, 0\leq{x}\leq4\)

    Easy to see that the graph satisfies the criteria for a probability density curve as it is above the \(x\)-axis and its area is the area of a right triangle with the base \(4\) and the height \(\frac{1}{2}\) which can be found using the formula for the area of a right triangle \(A=\frac{1}{2}bh=\frac{1}{2}\cdot4\cdot\frac{1}{2}=1\).

    clipboard_e6435afc3b4198eb7d8579d63d15b9f4b.png

    Let’s find the probability of \(X=2\). As we previously discussed, the probability of a continuous random variable being equal to a single value is equal to \(0\), \(P(X=2)=0\).

    clipboard_e72c36d68be1127006b25eac1e9335cb7.png

    To find the probability that \(X\) is less than \(2\) we will look for the area under the curve between \(0\) and \(2\). This region is a triangle with the base \(2\) and the height \(\frac{1}{4}\). The area can be found using the formula for the area of a right triangle and is equal to \(P(X<2)=0.25\) or \(25\%\).

    clipboard_e85c07929289f36f84a9e809dbafbd6cd.png

    To find the probability that \(X\) is less than \(3\) we will look for the area under the curve between \(0\) and \(3\). This region is a triangle with the base \(3\) and the height \(\frac{3}{8}\). The area can be found using the formula for the area of a right triangle and is equal to \(P(X<3)=0.5625\) or \(56.25\%\).

    clipboard_ea2cdb0448b79ddd1290d36c5d83b0dec.png

    To find the probability that \(X\) is greater than \(3\) we will look for the area under the curve between \(3\) and \(4\). This region is a trapezoid with the bases \(\frac{3}{8}\) and \(\frac{1}{2}\) and the height \(1\). The area can be found using the formula for the area of a right trapezoid and is equal to \(P(3<X<4)=0.4375\) or \(43.75\%\). Alternatively, we could have used the complementary rule to compute the same probability as the complement of the probability of \(X\) being less than \(3\) which we already computed previously, so the answer is \(P(3<X<4)=1-P(X<3)=1-0.5625=0.4375\) which is again \(43.75\%\).

    clipboard_efba6ec62fbe285f3ae97174e2feaecbf.png

    To find the probability that \(X\) is between \(2\) and \(3\) we will look for the area under the curve between \(2\) and \(3\). This region is a trapezoid with the bases \(\frac{1}{4}\) and \(\frac{3}{8}\) and the height \(1\). The area can be found using the formula for the area of a right trapezoid and is equal to \(P(2<X<3)=0.3125\) or \(31.25\%\). Alternatively, we could have used the subdivision rule to compute the same probability as the difference between the probability of \(X\) being less than \(3\) and the probability of \(X\) being less than \(2\) both of which we already computed previously, so the answer is \(P(2<X<3)=P(X<3)-P(X<2)=0.3125\) which is again \(31.25\%\).

    clipboard_e19283a9b30cbb110f812c007cc85f1c0.png

    It is worth noting that the probabilities of \(X\) being greater than \(5\) or less than \(-2\) are both \(0\) because the probability density curve has no area in that region. Also, the probability of \(X\) being greater than \(-2\) or less than \(5\) are both \(1\) because the probability density curve has its entire area in that region which is equal to \(1\) by definition.


    This page titled 7.1: Continuous Random Variables is shared under a not declared license and was authored, remixed, and/or curated by Anton Butenko.

    • Was this article helpful?