Calculating the Mean & Standard Deviation of Discrete Random Variables
I. Introduction
When presented with a discrete distribution, one must have a way to measure center and spread, just as is done for continuous distributions. This help page explains what formulas to use to measure both center and spread of a discrete distribution.
*For more information on what discrete variables are & the difference between discrete vs. continuous, click here.
II. Calculating the Variance and Standard Deviation of a Discrete Random Variables
Use the following three formulas to calculate either the mean, variance, or standard deviation of a discrete distribution. Note that the mean of a random variable is often called the expected value of the random variable.
MEAN/EXPECTED VALUE |
VARIANCE |
STANDARD DEVIATION |
\(E(X) = \mu_x =\displaystyle\sum_{i=1}^{n} x_i p_i \) | \(VAR(X) = \displaystyle\sigma^{2}_{x} = \displaystyle\sum_{i=1}^{n} (x_i - \mu_i )^{2}p_{i} \) | \(SD(X) = \displaystyle\sigma_{x} =\sqrt{ \displaystyle\sum (x_i - \mu_i )^{2}p_{i} } \) |
Note (1): This is true where \(x_i\) is the value of the random variable and \(p_i\) is the probability that x takes the value i.
Note (2): The mean must first be calculated before either the variance or the standard deviation can be calculated.
III. Example
A local baseball league was selling raffle tickets to generate funds for the league. Each ticket costs $1.00. If you bought a raffle ticket, there was a total of three possible outcomes. Participants win nothing with probability of 80%, participants win three dollars with probability of 19%, and participants win 10 dollars with probability of 1%. If X is a random variable that represents the net profit earned, complete the following questions:
a. Construct a probability table for random variable X.
b. Calculate the mean of the distribution.
c. Calculate the variance of the distribution.
d. Calculate the standard deviation of the distribution.
Solution:
a. Given that $1 dollar was paid to participate in the raffle and our random variable X represents the total profit earned, $1 must be subtracted from the winnings to get the true profit. For example, if you pay $1.00 to participate, and win $10.00, your net profit equals $10.00 minus the $1 you paid to play, or just $9.00. Thus the probability table is:
X | $-1.00 | $2.00 | $9.00 |
P(X=x) | 0.8 | 0.19 |
0.01 |
b. Now that we have constructed our probability table, we can calculate the mean of the distribution:
\(E(X) = \mu_x =\displaystyle\sum_{i=1}^{n} x_i p_i \)
\(\mu_{x}\) = ($-1.00)(0.8) + ($2.00)(0.19) + ($9.00)(0.01)
\(\mu_{x}\) = $-0.33
c. Now that we have calculated the mean of the distribution, we can calculate the variance using the following formula:
\(VAR(X) = \displaystyle\sigma^{2}_{x} = \displaystyle\sum_{i=1}^{n} (x_i - \mu_i )^{2}p_{i} \)
\(\sigma^{2} =\) (-$1.00 - (-0.33))^{2}(0.8) + ($2.00 - (-0.33))^{2}(0.19) + ($9.00 - (-0.33))^{2}(0.01)
\(\sigma^{2} =\) (-$1.00 + 0.33))^{2}(0.8) + ($2.00 + 0.33))^{2}(0.19) + ($9.00 + 0.33))^{2}(0.01)
\(\sigma^{2} =\) 2.2611
d. Calculate the standard deviation of the distribution.
\(\sigma = \sqrt{2.2611} = $1.504\)