Chapter 4: Discrete Random Variables

4.2 Measures of General Discrete Random Variables

Learning Objectives

By the end of this section, the student should be able to:

  • Calculate and interpret expected values of general random variables
  • Calculate and interpret the variance and standard deviation of general random variables

Once we know how to work with Discrete Random Variables we may be interested in some other measures such as the mean, variance, and standard deviation.  The ideas here are slightly different than we have seen before within our new context of Random Variables.

The Expected Value (Mean) of a Discrete Random Variable

The Law of Large Numbers states: as the number of trials in a probability experiment increases, our results become closer to what we “expect.” For instance, the student who was guessing on the true-false quiz in the chapter introduction would expect to get about half of the questions correct, since there are two options.

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 random variable and is denoted by the Greek letter [latex]\mu[/latex], or in the context of random variables, [latex]E[X][/latex]. In other words, after conducting many trials of an experiment, you would expect this average value.

To find the expected value, we multiply each value of the random variable by its probability, then add the products.

Mean or Expected Value: [latex]\mu={\sum\limits_{x \in X} }^{\text{​}}xP\left(x\right).[/latex]

 

Example

A university 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, [latex]\mu[/latex], of the number of days per week the team plays soccer.

We first let the random variable [latex]X[/latex] = the number of days the team plays soccer per week. Then [latex]x[/latex] takes on the values 0, 1, 2. Construct a PDF table adding a column [latex]x \cdot P(x)[/latex]. In this column, you multiply each value by its probability.

Figure 4.5: Expected Value Table. This table helps you calculate the expected value by giving you a column of products to sum.
[latex]x[/latex] [latex]P(x)[/latex] [latex]x \cdot P(x)[/latex]
0 0.2 (0)(0.2) = 0
1 0.5 (1)(0.5) = 0.5
2 0.3 (2)(0.3) = 0.6

What is the expected value?

 

Your turn!

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?

Figure 4.3 (repeat): Post-Op Patients
[latex]x[/latex] [latex]P(x)[/latex]
0 [latex]P(0)=\frac{4}{50}[/latex]
1 [latex]P(1) = \frac{8}{50}[/latex]
2 [latex]P(2) = \frac{16}{50}[/latex]
3 [latex]P(3) = \frac{14}{50}[/latex]
4 [latex]P(4) = \frac{6}{50}[/latex]
5 [latex]P(5) = \frac{2}{50}[/latex]

The Variance and Standard Deviation of a Discrete Random Variable

Like data, probability distributions have standard deviations. The standard deviation ([latex]\sigma[/latex]) of a probability distribution is the sum of the squares of the difference between its outcomes and expected value weighted by the probability of the outcome.

Computing the variance, [latex]\sigma^2[/latex] or [latex]V[X][/latex], and standard deviation, [latex]\sigma[/latex] or [latex]SD[X][/latex]. of a random variable starts similar to what we have seen before for data but differs at step 4:

  1. Find the mean [latex]\mu[/latex].
  2. Subtract the mean from each value of x to get your deviations.
  3. Square each deviation.
  4. Multiply each squared deviation by its probability, P(x).
  5. Sum each of the products.

At this point you now have the variance then can of course take the square root of the variance to get your standard deviation.  The formula looks like this:

[latex]\sigma = \sqrt{\underset{x\in X}{{\sum }^{\text{​}}}{\left(x-\mu \right)}^{2}P\left(x\right)}[/latex]

Example

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

Figure 4.6: Newborn Baby Crying. You expect a newborn to wake a parent after midnight 2.1 times per week, on the average.
[latex]x[/latex] [latex]P(x)[/latex] [latex]x \cdot P(x)[/latex] [latex](x – \mu)^2 \cdot P(x)[/latex]
0 [latex]P(0) = \frac{2}{50}[/latex] [latex](0)\left(\frac{2}{50}\right)= 0[/latex] (0 – 2.1)2 ⋅ 0.04 = 0.1764
1 [latex]P(1) = \frac{11}{50}[/latex] [latex](1)\left(\frac{11}{50}\right)= \frac{11}{50}[/latex] (1 – 2.1)2 ⋅ 0.22 = 0.2662
2 [latex]P(2) = \frac{23}{50}[/latex] [latex](2)\left(\frac{23}{50}\right) = \frac{46}{50}[/latex] (2 – 2.1)2 ⋅ 0.46 = 0.0046
3 [latex]P(3) = \frac{9}{50}[/latex] [latex](3)\left(\frac{9}{50}\right) = \frac{27}{50}[/latex] (3 – 2.1)2 ⋅ 0.18 = 0.1458
4 [latex]P(4) = \frac{4}{50}[/latex] [latex](4)\left(\frac{4}{50}\right) = \frac{16}{50}[/latex] (4 – 2.1)2 ⋅ 0.08 = 0.2888
5 [latex]P(5) = \frac{1}{50}[/latex] [latex](5)\left(\frac{1}{50}\right)= \frac{5}{50}[/latex] (5 – 2.1)2 ⋅ 0.02 = 0.1682

a. Add the values in the third column of the table to find the expected value of [latex]X[/latex].

b. Use [latex]\mu[/latex] to complete the table. The fourth column of this table will provide the values you need to calculate the standard deviation. For each value [latex]x[/latex], multiply the square of its deviation by its probability. (Each deviation has the format [latex]x-\mu[/latex].)

c. Add the values in the fourth column of the table:

d. The standard deviation of [latex]X[/latex] is the square root of this sum.

e. The mean, [latex]\mu[/latex], of a discrete probability function is the expected value.

f. The standard deviation, [latex]\Sigma[/latex], of the PDF is the square root of the variance.

When all outcomes in the probability distribution are equally likely, these formulas coincide with the mean and standard deviation of the set of possible outcomes.

 

Your turn!

Suppose you are booking a trip two days away that costs $1,000 and choose to purchase travel insurance for an additional $30. If you cannot go on your trip due to serious illness, you will receive back your $1,000 and have spent $30. Suppose the probability of getting ill in the next 48 hours is about 1.08%. Let [latex]X[/latex] = the cost of booking the trip. Find the mean and standard deviation of [latex]X[/latex].

If you travel at this cost frequently and always purchase travel insurance, will you save or lose money vs. if you did not purchase travel insurance?

Note on Calculations

Generally for probability distributions, we use a calculator or a computer to calculate μ and σ to reduce roundoff error. For many special cases of probability distributions, there are short-cut formulas for calculating μ, σ, and associated probabilities.  We will see some of these in the future.

Your turn!

Toss a fair, six-sided die twice. Let X = the number of faces that show an even number. Construct a table like Figure 4.6 and calculate the mean μ and standard deviation σ of X.

 

definition

License

Icon for the Creative Commons Attribution-ShareAlike 4.0 International License

Introductory Statistics Copyright © 2024 by LOUIS: The Louisiana Library Network is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License, except where otherwise noted.

Share This Book