The expected value of a discrete random variable X, symbolized as E(X), is often referred to as the long-term average or mean (symbolized as μ). This means that over the long term of doing an experiment over and over, you would expect this average. For example, let X = the number of heads you get when you toss three fair coins. If you repeat this experiment (toss three fair coins) a large number of times, the expected value of X is the number of heads you expect to get for each three tosses on average.
NOTE
To find the expected value, E(X), or mean μ of a discrete random variable X, simply multiply each value of the random variable by its probability and add the products. The formula is given as $E(X)=\mu ={\displaystyle \sum xP(x)}\text{.}$
Here x represents values of the random variable X, P(x) represents the corresponding probability, and symbol $\sum$ represents the sum of all products xP(x). Here we use symbol μ for the mean because it is a parameter. It represents the mean of a population.
Example 4.3
A men's soccer team plays soccer zero, one, or two days a week. The probability that they play zero days is .2, the probability that they play one day is .5, and the probability that they play two days is .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 X = the number of days the men's soccer team plays soccer per week. X takes on the values 0, 1, 2. Construct a PDF table adding a column x*P(x), the product of the value x with the corresponding probability P(x). In this column, you will multiply each x value by its probability.
x | P(x) | x*P(x) |
---|---|---|
0 | .2 | (0)(.2) = 0 |
1 | .5 | (1)(.5) = .5 |
2 | .3 | (2)(.3) = .6 |
Add the last column $x*P(x)$ to get the expected value/mean of the random variable X.
The expected value/mean 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.
As you learned in Chapter 3, if you toss a fair coin, the probability that the result is heads is 0.5. This probability is a theoretical probability, which is what we expect to happen. This probability does not describe the short-term results of an experiment. If you flip a coin two times, the probability does not tell you that these flips will result in one head and one tail. Even if you flip a coin 10 times or 100 times, the probability does not tell you that you will get half tails and half heads. The probability 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. The relative frequency of heads is 12,012/24,000 = .5005, which is very close to the theoretical probability .5. 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). The relative frequency is also called the experimental probability, a term that means what actually happens.
In the next example, we will demonstrate how to find the expected value and standard deviation of a discrete probability distribution by using relative frequency.
Like data, probability distributions have variances and standard deviations. The variance of a probability distribution is symbolized as ${\sigma}^{2}$ and the standard deviation of a probability distribution is symbolized as σ. Both are parameters since they summarize information about a population. To find the variance ${\sigma}^{2}$ of a discrete probability distribution, find each deviation from its expected value, square it, multiply it by its probability, and add the products. To find the standard deviation σ of a probability distribution, simply take the square root of variance ${\sigma}^{2}$. The formulas are given as below.
NOTE
The formula of the variance ${\sigma}^{2}$ of a discrete random variable X is
Here x represents values of the random variable X, μ is the mean of X, P(x) represents the corresponding probability, and symbol ∑ represents the sum of all products ${(x-\mu )}^{2}P(x).$
To find the standard deviation, σ, of a discrete random variable X, simply take the square root of the variance ${\sigma}^{2}$.
Example 4.4
A researcher conducted a study to investigate how a newborn baby’s crying after midnight affects the sleep of the baby's mother. The researcher randomly selected 50 new mothers and asked how many times they were awakened by their newborn baby's crying after midnight per week. Two mothers were awakened zero times, 11 mothers were awakened one time, 23 mothers were awakened two times, nine mothers were awakened three times, four mothers were awakened four times, and one mother was awakened five times. Find the expected value of the number of times a newborn baby's crying wakes its mother after midnight per week. Calculate the standard deviation of the variable as well.
To do the problem, first let the random variable X = the number of times a mother is awakened by her newborn’s crying after midnight per week. X takes on the values 0, 1, 2, 3, 4, 5. Construct a PDF table as below. The column of P(x) gives the experimental probability of each x value. We will use the relative frequency to get the probability. For example, the probability that a mother wakes up zero times is $\frac{2}{50}$ since there are two mothers out of 50 who were awakened zero times. The third column of the table is the product of a value and its probability, xP(x).
x | P(x) | xP(x) |
---|---|---|
0 | $$P\left(x\text{}=\text{}0\right)\text{}=\frac{2}{50}$$ | $\left(0\right)\left(\frac{2}{50}\right)=0$ |
1 | $$P\left(x\text{}=\text{}1\right)\text{}=\frac{11}{50}$$ | $\left(1\right)\left(\frac{11}{50}\right)=\frac{11}{50}$ |
2 | $$P\left(x\text{}=\text{}2\right)\text{}=\frac{23}{50}$$ | $\left(2\right)\left(\frac{23}{50}\right)=\frac{46}{50}$ |
3 | $$P\left(x\text{}=\text{}3\right)\text{}=\frac{9}{50}$$ | $\left(3\right)\left(\frac{9}{50}\right)=\frac{27}{50}$ |
4 | $$P\left(x\text{}=\text{4}\right)\text{}=\frac{4}{50}$$ | $\left(4\right)\left(\frac{4}{50}\right)=\frac{16}{50}$ |
5 | $$P\left(x\text{}=\text{}5\right)\text{}=\frac{1}{50}$$ | $\left(5\right)\left(\frac{1}{50}\right)=\frac{5}{50}$ |
We then add all the products in the third column to get the mean/expected value of X.
Therefore, we expect a newborn to wake its mother after midnight 2.1 times per week, on the average.
To calculate the standard deviation σ, we add the fourth column (x-μ)^{2} and the fifth column ${(x-\mu )}^{2}\bullet P(x)$ to get the following table:
x | P(x) | xP(x) | (x-µ)^{2} | (x-µ)^{2}•P(x) |
---|---|---|---|---|
0 | $$P\left(x\text{}=\text{}0\right)\text{}=\frac{2}{50}$$ | $\left(0\right)\left(\frac{2}{50}\right)=0$ | ${(0-2.1)}^{2}=4.41$ | $$4.41\u2022\frac{2}{50}=.1764$$ |
1 | $$P\left(x\text{}=\text{}1\right)\text{}=\frac{11}{50}$$ | $\left(1\right)\left(\frac{11}{50}\right)=\frac{11}{50}$ | ${(1-2.1)}^{2}=1.21$ | $$1.21\u2022\frac{11}{50}=.2662$$ |
2 | $$P\left(x\text{}=\text{}2\right)\text{}=\frac{23}{50}$$ | $\left(2\right)\left(\frac{23}{50}\right)=\frac{46}{50}$ | ${(2-2.1)}^{2}=.01$ | $$.01\u2022\frac{23}{50}=.0046$$ |
3 | $$P\left(x\text{}=\text{}3\right)\text{}=\frac{9}{50}$$ | $\left(3\right)\left(\frac{9}{50}\right)=\frac{27}{50}$ | ${(3-2.1)}^{2}=.81$ | $$.81\u2022\frac{9}{50}=.1458$$ |
4 | $$P\left(x\text{}=\text{}4\right)\text{}=\frac{4}{50}$$ | $\left(4\right)\left(\frac{4}{50}\right)=\frac{16}{50}$ | ${(4-2.1)}^{2}=3.61$ | $$3.61\u2022\frac{4}{50}=.2888$$ |
5 | $$P\left(x\text{}=\text{}5\right)\text{}=\frac{1}{50}$$ | $\left(5\right)\left(\frac{1}{50}\right)=\frac{5}{50}$ | ${(5-2.1)}^{2}=8.41$ | $$8.41\u2022\frac{1}{50}=.1682$$ |
We then add all the products in the 5^{th} column to get the variance of X.
To get the standard deviation σ, we simply take the square root of variance σ^{2}.
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 | P(x = 0) = $\frac{4}{50}$ |
1 | P(x = 1) = $\frac{8}{50}$ |
2 | P(x = 2) = $\frac{16}{50}$ |
3 | P(x = 3) = $\frac{14}{50}$ |
4 | P(x = 4) = $\frac{6}{50}$ |
5 | P(x = 5) = $\frac{2}{50}$ |
Example 4.5
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?
To do this problem, set up a PDF table for the amount of money you can profit.
Let X = the amount of money you profit. If your five numbers match in order, you will win the game and will get your $2 back plus $100,000. That means your profit is $100,000. If your five numbers do not match in order, you will lose the game and lose your $2. That means your profit is -$2. Therefore, X takes on the values $100,000 and –$2. That is the second column x in the PDF table below.
To win, you must get all five numbers correct, in order. The probability of choosing the correct first number is $\frac{1}{10}$ because there are 10 numbers (from zero to nine) and only one of them is correct. The probability of choosing the correct second number is also $\frac{1}{10}$ because the selection is done with replacement and there are still 10 numbers (from zero to nine) for you to choose. Due to the same reason, the probability of choosing the correct third number, the correct fourth number, and the correct fifth number are also $\frac{1}{10}$ . The selection of one number does not affect the selection of another number. That means the five selections are independent. The probability of choosing all five correct numbers and in order is equal to the product of the probabilities of choosing each number correctly.
Therefore, the probability of winning is .00001 and the probability of losing is 1 − .00001 = .99999. That is how we get the third column P(x) in the PDF table below.
To get the fourth column xP(x) in the table, we simply multiply the value x with the corresponding probability P(x).
The PDF table is as follows:
x | P(x) | x*P(x) | |
---|---|---|---|
Loss | –2 | .99999 | (–2)(.99999) = –1.99998 |
Profit | 100,000 | .00001 | (100000)(.00001) = 1 |
We then add all the products in the last column to get the mean/expected value of X.
Since –.99998 is about –1, you would, on average, expect to lose approximately $1 for each game you play. However, each time you play, you either lose $2 or profit $100,000. The $1 is the average or expected loss per game after playing this game over and over.
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 4.6
Suppose you play a game with a biased coin. You play each game by tossing the coin once. P(heads) = $\frac{2}{3}$ and P(tails) = $\frac{1}{3}$. 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?
a. Define a random variable X.
a. X = amount of profit
b. Complete the following expected value table.
x | ____ | ____ | |
---|---|---|---|
WIN | 10 | $\frac{1}{3}$ | ____ |
LOSE | ____ | ____ | $\frac{\mathrm{\u201312}}{3}$ |
b.
x | P(x) | xP(x) | |
---|---|---|---|
WIN | 10 | $\frac{1}{3}$ | $\frac{10}{3}$ |
LOSE | –6 | $\frac{2}{3}$ | $\frac{\mathrm{\u201312}}{3}$ |
c. What is the expected value, μ? Do you come out ahead?
c. Add the last column of the table. The expected value $E\left(X\right)=\mu =\frac{10}{3}+\left(-\frac{12}{3}\right)=-\frac{2}{3}\approx -.67$. You lose, on average, about 67 cents each time you play the game, so you do not come out ahead.
Suppose you play a game with a spinner. You play each game by spinning the spinner once. P(red) = $\frac{2}{5}$, P(blue) = $\frac{2}{5}$, and P(green) = $\frac{1}{5}$. 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 | $\text{\u2013}\frac{20}{5}$ | ||
Blue | $\frac{2}{5}$ | ||
Green | 10 |
Generally for probability distributions, we use a calculator or a computer to calculate μ and σ to reduce rounding errors. For some probability distributions, there are shortcut formulas for calculating μ and σ.
Example 4.7
Toss a fair, six-sided die twice. Let X = the number of faces that show an even number. Construct a table like Table 4.12 and calculate the mean μ and standard deviation σ of X.
Tossing one fair six-sided die twice has the same sample space as tossing two fair six-sided dice. The sample space has 36 outcomes.
(1, 1) | (1, 2) | (1, 3) | (1, 4) | (1, 5) | (1, 6) |
(2, 1) | (2, 2) | (2, 3) | (2, 4) | (2, 5) | (2, 6) |
(3, 1) | (3, 2) | (3, 3) | (3, 4) | (3, 5) | (3, 6) |
(4, 1) | (4, 2) | (4, 3) | (4, 4) | (4, 5) | (4, 6) |
(5, 1) | (5, 2) | (5, 3) | (5, 4) | (5, 5) | (5, 6) |
(6, 1) | (6, 2) | (6, 3) | (6, 4) | (6, 5) | (6, 6) |
Use the sample space to complete the following table.
x | P(x) | xP(x) | (x – μ)^{2} $\cdot $ P(x) |
---|---|---|---|
0 | $\frac{9}{36}$ | 0 | (0 – 1)^{2} ⋅ $\frac{9}{36}$ = $\frac{9}{36}$ |
1 | $\frac{18}{36}$ | $\frac{18}{36}$ | (1 – 1)^{2} ⋅ $\frac{18}{36}$ = 0 |
2 | $\frac{9}{36}$ | $\frac{18}{36}$ | (2 – 1)^{2} ⋅ $\frac{9}{36}$ = $\frac{9}{36}$ |
Add the values in the third column to find the expected value: μ = $\frac{36}{36}$ = 1. Use this value to complete the fourth column.
Add the values in the fourth column and take the square root of the sum: σ = $\sqrt{\frac{18}{36}}$ ≈ .7071.
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.