Skip to main content
Statistics LibreTexts

5.2: Expected Value of Discrete Distributions

  • Page ID
    58906
  • \( \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}\)

    In this section, we begin putting probability distributions to work in a new way by calculating what we expect to happen on average. The expected value tells us about the typical value or the long term average of repeating an experiment leading to the random variable.


    Definition: Expected Value (Mean)

    The expected value of a discrete random variable \( X \), denoted \( E(X) \) or \( \mu \), is the theoretical average outcome of the distribution.

    \[ E(X) = \sum x \cdot P(X = x) \]

    In words: multiply each value \( x \) by its probability, then add them all up.

    Example: Lottery Scratch Ticket

    A scratch ticket game costs $5 to play. The possible prizes and their probabilities are shown below. To analyze the game, we'll compute the net gain (prize minus the cost to play).

    Calculating expected value
    Prize Net Gain (x) Probability P(X = x) \( x \cdot P(X = x) \)
    $0 –5 0.849 –4.245
    $5 0 0.08 0.00
    $20 15 0.05 0.75
    $100 95 0.02 1.90
    $500 495 0.001 0.495
    Total Expected Value: -1.10

    The value of -1.10 is our expected value, and takes the same units as the random variable. In this case it represents a loss of $1.10. It is impossible for any individual player to lose this amount, but if a large number of individuals buy tickets, and we calculate the average of all their gains and losses, the average will be -1.10. This value is negative because the majority of players lose a little money, whereas very few players will win a considerable amount. The fact that the expected value is negative is important for the success of the lottery; if the expected value was positive, then the lottery would on average pay out money and lose their funds. With a negative expected value, the lottery will bring in more money than they pay out, which keeps the lottery running and may be used to raise funds for public services such as education or conservation.


    Measuring Variation: Variance and Standard Deviation

    The expected value, or mean, describes the center of the data, but it doesn’t tell us how much values vary around that center. For that, we need to revisit measures of spread.

    The variance of a discrete random variable \( X \), denoted \( \sigma^2 \), measures the average squared distance from the mean:

    \[ \mathrm{Var}(X) = \sigma^2 = \sum (x - \mu)^2 \cdot P(x) \]

    The standard deviation \( \sigma \) is the square root of the variance. It measures typical distance from the mean, in the same units as the data:

    \[ \sigma = \sqrt{\sum (x - \mu)^2 \cdot P(x)} \]

    The standard deviation gives us a measure of how the data, on average, differs from the mean. Let’s revisit our lottery example to calculate its variance and standard deviation. We found before that \(\mu = -1.10\). We can build a table to compute the variance in a similar manner as we did the expected value; you can verify these results yourself using a spreadsheet tool such as Microsoft Excel or Google Sheets.

    Variance calculations
    Prize Net Gain (x) Probability P(X = x) x - μ (x – μ)² (x – μ)² ⋅ P(x)
    $0 –5 0.849 -3.9 15.21 12.91329
    $5 0 0.08 1.1 1.21 0.09605
    $20 15 0.05 16.1 259.21 12.9605
    $100 95 0.02 96.1 9235.21 184.7042
    $500 495 0.001 496.1 246115.2 246.11521
        Variance: 456.79

    Taking the square root of this value for the variance, we obtain \(\sigma = \sqrt{456.79} \approx 21.37\). The larger this value of \(\sigma\), the more spread out the data is. In this case, our data is relatively spread out!

    Example: Rolling a Loaded Die

    Suppose a six-sided die has been tampered with so that it produces the following outcomes:

    Distribution of a loaded die
    Outcome (x) Probability P(x)
    1 0.10
    2 0.15
    3 0.20
    4 0.20
    5 0.25
    6 0.10

    Step 0: Verify this is a random variable.

    • All probabilities are between 0 and 1
    • All probabilities add to 1

    Step 1: Compute the expected value

    \[ E(X) = 1(0.10) + 2(0.15) + 3(0.20) + 4(0.20) + 5(0.25) + 6(0.10) = 3.65 \]

    Step 2: Compute the variance

    \[ \sigma^2 = \sum (x - 3.65)^2 \cdot P(x) = (1 - 3.65)^2(0.10) + \dots + (6 - 3.65)^2(0.10) \]

    You can use the formula, but it is easier to keep track of with a table. These values were actually calculated in Microsoft Excel

    Calculating variance
    x P(x) (x – μ) (x – μ)² (x – μ)² ⋅ P(x)
    1 0.10 –2.65 7.0225 0.70225
    2 0.15 –1.65 2.7225 0.408375
    3 0.20 –0.65 0.4225 0.0845
    4 0.20 0.35 0.1225 0.0245
    5 0.25 1.35 1.8225 0.455625
    6 0.10 2.35 5.5225 0.55225
    Total Variance: 2.2275

    Standard deviation: \( \sigma = \sqrt{2.2275} \approx 1.4925 \)


    Summary

    • \( E(X) \) tells us what to expect on average (long term).
    • \( \mathrm{Var}(X) \) and \( \sigma \) tell us how spread out the values are around the mean.
    • Just like with data summaries: mean for center, standard deviation for spread!

    Related Video


    This page titled 5.2: Expected Value of Discrete Distributions is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Mathematics Department.

    • Was this article helpful?