Statistics for Discrete Random Variables

Learning Outcomes

  • Calculate and interpret the mean or expected value of a discrete random variable
  • Calculate the standard deviation of a discrete random variable

Recall: Translating Words to Inequality Statements

To make sure probabilities are calculated correctly, we need to know if certain values are included or not included. Let’s say [latex]x =[/latex] the number of children in a family. If the event is at least 5 children, it would be written as [latex]x ≥ 5[/latex]. Notice the inequality sign is underlined, which means 5 is included. Other examples of words and their associated inequality statements can be seen in the table below.

Words Inequality Statement
No more than 4 [latex]\displaystyle x \leq 4[/latex]
Fewer than 2 [latex]\displaystyle x<2[/latex]
Between 1 and 4 [latex]\displaystyle 1
At most 6 [latex]\displaystyle x \leq 6[/latex]
At least 1 [latex]\displaystyle x \geq 1[/latex]
More than 3 [latex]\displaystyle x>3[/latex]

The expected value is often referred to as the long-term average or mean. This means that over the long term of doing an experiment over and over, you would expect this average.

You toss a coin and record the result. What is the probability that the result is heads? If you flip a coin two times, does probability tell you that these flips will result in one heads and one tail? You might toss a fair coin ten times and record nine heads. Probability does not describe the short-term results of an experiment. It gives information about what can be expected in the long term. To demonstrate this, Karl Pearson once tossed a fair coin 24,000 times! He recorded the results of each toss, obtaining heads 12,012 times. In his experiment, Pearson illustrated the Law of Large Numbers.

The Law of Large Numbers states that, as the number of trials in a probability experiment increases, the difference between the theoretical probability of an event and the relative frequency approaches zero (the theoretical probability and the relative frequency get closer and closer together). When evaluating the long-term results of statistical experiments, we often want to know the “average” outcome. This long-term average is known as the mean or expected value of the experiment and is denoted by the Greek letter μ. In other words, after conducting many trials of an experiment, you would expect this average value.

Note

To find the expected value or long term average, μ, simply multiply each value of the random variable by its probability and add the products.

Example

A men’s soccer team plays soccer zero, one, or two days a week. The probability that they play zero days is 0.2, the probability that they play one day is 0.5, and the probability that they play two days is 0.3. Find the long-term average or expected value, μ, of the number of days per week the men’s soccer team plays soccer.

To do the problem, first let the random variable [latex]X[/latex] = the number of days the men’s soccer team plays soccer per week. [latex]X[/latex] takes on the values 0, 1, 2. Construct a PDF table adding a column [latex]x ⋅ P(x)[/latex]. In this column, you will multiply each [latex]x[/latex] value by its probability.

Expected Value Table. This table is called an expected value table. The table helps you calculate the expected value or long-term average.

x P(x) xP(x)
0 0.2 (0)(0.2) = 0
1 0.5 (1)(0.5) = 0.5
2 0.3 (2)(0.3) = 0.6

This table is called an expected value table. The table helps you calculate the expected value or long-term average.

Add the last column [latex]x ⋅ P(x)[/latex] to find the long term average or expected value: (0)(0.2) + (1)(0.5) + (2)(0.3) = 0 + 0.5 + 0.6 = 1.1.

The expected value is 1.1. The men’s soccer team would, on the average, expect to play soccer 1.1 days per week. The number 1.1 is the long-term average or expected value if the men’s soccer team plays soccer week after week after week. We say μ = 1.1.

Example

Find the expected value of the number of times a newborn baby’s crying wakes its mother after midnight. The expected value is the expected number of times per week a newborn baby’s crying wakes its mother after midnight. Calculate the standard deviation of the variable as well.

x P(x) xP(x) (xμ)2P(x)
0 [latex]\displaystyle{P}{({x}={0})}=\frac{{2}}{{50}}[/latex] [latex]\displaystyle{({0})}{(\frac{{2}}{{50}})}={0}[/latex] [latex]\displaystyle { ( { 0 } - { 2.1 } ) } ^{ { 2 } } \cdot { 0.04}={0.1764}[/latex]
1 [latex]\displaystyle{P}{({x}={1})}=\frac{{11}}{{50}}[/latex] [latex]\displaystyle{({1})}{(\frac{{11}}{{50}})}=\frac{{11}}{{50}}[/latex] [latex]\displaystyle{({1}-{2.1})}^{{2}}\cdot{0.22}={0.2662}[/latex]
2 [latex]\displaystyle{P}{({x}={2})}=\frac{{23}}{{50}}[/latex] [latex]\displaystyle{({2})}{(\frac{{23}}{{50}})}=\frac{{46}}{{50}}[/latex] [latex]\displaystyle{({2}-{2.1})}^{{2}}\cdot{0.46}={0.0046}[/latex]
3 [latex]\displaystyle{P}{({x}={3})}=\frac{{9}}{{50}}[/latex] [latex]\displaystyle{({3})}{(\frac{{9}}{{50}})}=\frac{{27}}{{50}}[/latex] [latex]\displaystyle{({3}-{2.1})}^{{2}}\cdot{0.18}={0.1458}[/latex]
4 [latex]\displaystyle{P}{({x}={4})}=\frac{{4}}{{50}}[/latex] [latex]\displaystyle{({4})}{(\frac{{4}}{{50}})}=\frac{{16}}{{50}}[/latex] [latex]\displaystyle{({4}-{2.1})}^{{2}}\cdot{0.08}={0.2888}[/latex]
5 [latex]\displaystyle{P}{({x}={5})}=\frac{{1}}{{50}}[/latex] [latex]\displaystyle{({5})}{(\frac{{1}}{{50}})}=\frac{{5}}{{50}}[/latex] [latex]\displaystyle{({5}-{2.1})}^{{2}}\cdot{0.02}={0.1682}[/latex]

You expect a newborn to wake its mother after midnight 2.1 times per week, on the average.

try it

A hospital researcher is interested in the number of times the average post-op patient will ring the nurse during a 12-hour shift. For a random sample of 50 patients, the following information was obtained. What is the expected value?

x P(x)
0 [latex]\displaystyle{P}{({x}={0})}=\frac{{4}}{{50}}[/latex]
1 [latex]\displaystyle{P}{({x}={1})}=\frac{{8}}{{50}}[/latex]
2 [latex]\displaystyle{P}{({x}={2})}=\frac{{16}}{{50}}[/latex]
3 [latex]\displaystyle{P}{({x}={3})}=\frac{{14}}{{50}}[/latex]
4 [latex]\displaystyle{P}{({x}={4})}=\frac{{6}}{{50}}[/latex]
5 [latex]\displaystyle{P}{({x}={5})}=\frac{{2}}{{50}}[/latex]

 

Example

Suppose you play a game of chance in which five numbers are chosen from 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. A computer randomly selects five numbers from zero to nine with replacement. You pay $2 to play and could profit $100,000 if you match all five numbers in order (you get your $2 back plus $100,000). Over the long term, what is your expected profit of playing the game?

try it

You are playing a game of chance in which four cards are drawn from a standard deck of 52 cards. You guess the suit of each card before it is drawn. The cards are replaced in the deck on each draw. You pay $1 to play. If you guess the right suit every time, you get your money back and $256. What is your expected profit of playing the game over the long term?

EXAMPLE

Suppose you play a game with a biased coin. You play each game by tossing the coin once.
P(heads) = [latex]\displaystyle\frac{{2}}{{3}}[/latex]. If you toss a head, you pay $6. If you toss a tail, you win $10. If you play this game many times, will you come out ahead?

  1. Define a random variable [latex]X[/latex].
  2. Complete the following expected value table.
    x ____ ____
    WIN 10 [latex]\displaystyle \frac{{1}}{{3}}[/latex] ____
    LOSE ____ ____ [latex]\displaystyle \frac{{-12}}{{3}}[/latex]
  3. What is the expected value, μ? Do you come out ahead?

try it

Suppose you play a game with a spinner. You play each game by spinning the spinner once.
P(red) = [latex]\displaystyle\frac{{2}}{{5}}[/latex], P(blue) = [latex]\displaystyle\frac{{2}}{{5}}[/latex], and P(green) = [latex]\displaystyle\frac{{1}}{{5}}[/latex]. If you land on red, you pay $10. If you land on blue, you don’t pay or win anything. If you land on green, you win $10. Complete the following expected value table.

x P(x)
Red [latex]-\frac{20}{5}[/latex]
Blue [latex]\frac{2}{5}[/latex]
Green [latex]10[/latex]

 

Like data, probability distributions have standard deviations. To calculate the standard deviation (σ) of a probability distribution, find each deviation from its expected value, square it, multiply it by its probability, add the products, and take the square root. To understand how to do the calculation, look at the table for the number of days per week a men’s soccer team plays soccer. To find the standard deviation, add the entries in the column labeled (xμ)2P(x) and take the square root.

x P(x) xP(x) (xμ)2P(x)
0 0.2 (0)(0.2) = 0 (0 – 1.1)2(0.2) = 0.242
1 0.5 (1)(0.5) = 0.5 (1 – 1.1)2(0.5) = 0.005
2 0.3 (2)(0.3) = 0.6 (2 – 1.1)2(0.3) = 0.243

Add the last column in the table. 0.242 + 0.005 + 0.243 = 0.490. The standard deviation is the square root of 0.49, or σ = [latex]\displaystyle\sqrt{{0.49}}[/latex] = 0.7

Generally for probability distributions, we use a calculator or a computer to calculate μ and σ to reduce roundoff error. For some probability distributions, there are short-cut formulas for calculating μ and σ.

Example

Toss a fair, six-sided die twice. Let [latex]X[/latex] = the number of faces that show an even number. Construct a table like the one in the Try It above and calculate the mean μ and standard deviation σ of [latex]X[/latex].

Example

On May 11, 2013 at 9:30 PM, the probability that moderate seismic activity (one moderate earthquake) would occur in the next 48 hours in Iran was about 21.42%. Suppose you make a bet that a moderate earthquake will occur in Iran during this period. If you win the bet, you win $50. If you lose the bet, you pay $20. Let [latex]X[/latex]= the amount of profit from a bet.

P(win) = P(one moderate earthquake will occur) = 21.42%

P(loss) = P(one moderate earthquake will not occur) = 100% – 21.42%

If you bet many times, will you come out ahead? Explain your answer in a complete sentence using numbers. What is the standard deviation of [latex]X[/latex]? Construct a table similar to the one in the previous example to help you answer these questions.

try it

On May 11, 2013 at 9:30 PM, the probability that moderate seismic activity (one moderate earthquake) would occur in the next 48 hours in Japan was about 1.08%. As in the previous example, you bet that a moderate earthquake will occur in Japan during this period. If you win the bet, you win $100. If you lose the bet, you pay $10. Let [latex]X[/latex]= the amount of profit from a bet. Find the mean and standard deviation of [latex]X[/latex].

 


Some of the more common discrete probability functions are binomial, geometric, hypergeometric, and Poisson. Most elementary courses do not cover the geometric, hypergeometric, and Poisson. Your instructor will let you know if he or she wishes to cover these distributions.

A probability distribution function is a pattern. You try to fit a probability problem into a pattern or distribution in order to perform the necessary calculations. These distributions are tools to make solving probability problems easier. Each distribution has its own special characteristics. Learning the characteristics enables you to distinguish among the different distributions.