Skip to content

Unit 2: Probability, Random Variables, and Probability Distributions

Parameters of Random Variables

Calculate the mean (expected value) and standard deviation of a discrete random variable and interpret both in context as long-run quantities.

Topic 2.9 · 7 min read

An airline knows that when a passenger is chosen at random, the number of bags XX that person checks follows the distribution below. The airline does not care about one passenger: it cares about the next 300,000, because that number decides how many baggage handlers and how much cargo space it needs. Two numbers summarize what XX does over that many passengers: its mean (where the values center in the long run) and its standard deviation (how far they typically land from that center).

x0123P(X=x)0.250.500.200.05\begin{array}{l|cccc} x & 0 & 1 & 2 & 3 \\ \hline P(X = x) & 0.25 & 0.50 & 0.20 & 0.05 \end{array}

Parameters: fixed numbers that describe a distribution

A parameter is a number that describes a whole probability distribution or a whole population. Once the distribution is set, a parameter has exactly one value, and it does not change: the mean of the bag distribution above is one number, whoever happens to board today.

Compare that with a statistic, a number computed from a sample. If you record the bags of 40 passengers on Tuesday's 7 a.m. flight and average them, you get a statistic, and Wednesday's 40 passengers will give a different one. Statistics vary from sample to sample; parameters don't. Topic 2.12 is about how statistics vary; this topic is about the two parameters of a random variable.

The random variables here are discrete: their possible values can be listed, either a finite list (0, 1, 2, 3 bags) or a countable one (0, 1, 2, ... with no top). Topic 2.8 covered how to build their distributions. A continuous random variable, such as a waiting time, can take any value in an interval, and Topic 2.11 handles it differently.

The mean: a weighted average of the possible values

The mean or expected value of a discrete random variable XX is written μX\mu_X or E(X)E(X) and calculated as

μX=E(X)=∑xi P(xi),\mu_X = E(X) = \sum x_i \, P(x_i),

where the xix_i are the possible values and P(xi)P(x_i) is the probability of each one. Multiply each value by its probability and add.

The formula comes straight from averaging a long run of outcomes. Picture 1,000 passengers. About 250 check no bags, 500 check one, 200 check two and 50 check three. Their total is 0(250)+1(500)+2(200)+3(50)=1,0500(250) + 1(500) + 2(200) + 3(50) = 1{,}050 bags, and the average is 1,050/1,000=1.051{,}050/1{,}000 = 1.05 bags. Dividing each count by 1,000 turns it into a probability, which is exactly the formula:

μX=0(0.25)+1(0.50)+2(0.20)+3(0.05)=1.05 bags.\mu_X = 0(0.25) + 1(0.50) + 2(0.20) + 3(0.05) = 1.05 \text{ bags.}

Three facts follow from this picture. First, the mean is a weighted average: a value with a large probability pulls the mean toward itself, which is why simply averaging 0, 1, 2 and 3 (to get 1.5) is wrong. Second, μX\mu_X doesn't have to be a possible value; no passenger checks 1.05 bags. Third, the mean describes the long run, not the next passenger. The law of large numbers says the average of many independent observations of XX gets closer and closer to μX\mu_X, so "expected" means "what the average settles at", not "what you should expect to see next".

The standard deviation: the typical distance from the mean

Two random variables can share a mean and behave very differently. The standard deviation σX\sigma_X, also written SD(X)SD(X), measures how far the values of XX typically fall from μX\mu_X in the long run:

σX=∑(xi−μX)2 P(xi).\sigma_X = \sqrt{\sum (x_i - \mu_X)^2 \, P(x_i)}.

Read it inside out. Each xi−μXx_i - \mu_X is a deviation: how far that value is from the mean. Squaring makes every deviation positive (otherwise they cancel, since the weighted deviations always add to 0) and weights big misses more heavily. Multiplying by P(xi)P(x_i) averages the squared deviations over the long run. That average is the variance, σX2\sigma_X^2 or Var(X)Var(X). Its units are squared (bags squared), so the last step takes the square root to get back to the units of XX.

For the bags, with μX=1.05\mu_X = 1.05:

σX2=(0−1.05)2(0.25)+(1−1.05)2(0.50)+(2−1.05)2(0.20)+(3−1.05)2(0.05)=0.6475,\sigma_X^2 = (0 - 1.05)^2(0.25) + (1 - 1.05)^2(0.50) + (2 - 1.05)^2(0.20) + (3 - 1.05)^2(0.05) = 0.6475,

so σX=0.6475≈0.80\sigma_X = \sqrt{0.6475} \approx 0.80 bags. Over many randomly chosen passengers, the number of bags checked typically differs from the mean of 1.05 bags by about 0.80 bags.

On a TI-84, put the values in L1 and the probabilities in L2 and run 1-Var Stats L1, L2. The calculator reports μX\mu_X as xˉ\bar{x} and σX\sigma_X as σx\sigma x (ignore SxSx, which is for samples). On the exam, show the formula with the numbers substituted, then you may let the calculator finish.

Worked examples

Worked exampleExample 1: is the game worth playing?

A school fundraiser charges $2 to spin a wheel. The wheel pays a $10 prize with probability 0.10, a $3 prize with probability 0.20, and nothing otherwise. Let GG be a player's net gain (prize minus the $2 cost) on one spin. Find and interpret E(G)E(G).

Show solution

Net gain subtracts the cost from each prize, so the possible values are 10−2=810 - 2 = 8, 3−2=13 - 2 = 1 and 0−2=−20 - 2 = -2 dollars. The probabilities must add to 1, so P(G=−2)=1−0.10−0.20=0.70P(G = -2) = 1 - 0.10 - 0.20 = 0.70.

E(G)=8(0.10)+1(0.20)+(−2)(0.70)=0.80+0.20−1.40=−0.40.E(G) = 8(0.10) + 1(0.20) + (-2)(0.70) = 0.80 + 0.20 - 1.40 = -0.40.

Interpretation: if a player spins this wheel many, many times, the player's average net gain will be about −$0.40-\$0.40 per spin, a loss of 40 cents per spin. Equivalently, the fundraiser earns about 40 cents per spin in the long run.

A fair game has an expected net gain of 0. The expected prize is 10(0.10)+3(0.20)=$1.6010(0.10) + 3(0.20) = \$1.60, so a price of $1.60 per spin would make this game fair. A single player can still walk away $8 ahead; the expected value says nothing about one spin.

Worked exampleExample 2: same idea, different risk

A basketball player makes 52% of her 2-point attempts and 36% of her 3-point attempts. Let TT be the points scored on one 2-point attempt and HH the points scored on one 3-point attempt. Compare the two shots using the mean and standard deviation of each.

Show solution

Each shot has two outcomes. For the 2-pointer, T=2T = 2 with probability 0.52 and T=0T = 0 with probability 0.48:

μT=2(0.52)+0(0.48)=1.04,σT=(2−1.04)2(0.52)+(0−1.04)2(0.48)=0.9984≈1.00.\mu_T = 2(0.52) + 0(0.48) = 1.04, \quad \sigma_T = \sqrt{(2 - 1.04)^2(0.52) + (0 - 1.04)^2(0.48)} = \sqrt{0.9984} \approx 1.00.

For the 3-pointer, H=3H = 3 with probability 0.36 and H=0H = 0 with probability 0.64:

μH=3(0.36)+0(0.64)=1.08,σH=(3−1.08)2(0.36)+(0−1.08)2(0.64)=2.0736=1.44.\mu_H = 3(0.36) + 0(0.64) = 1.08, \quad \sigma_H = \sqrt{(3 - 1.08)^2(0.36) + (0 - 1.08)^2(0.64)} = \sqrt{2.0736} = 1.44.

Over many attempts, her 3-pointers average about 1.08 points per shot and her 2-pointers about 1.04, so the 3-point shot is slightly better on average. It is also much more variable: points per 3-point attempt typically differ from their mean by about 1.44 points, compared with about 1.00 point for 2-point attempts. A coach who needs one sure basket at the end of a game and a coach planning a whole season are reading different parameters.

Worked exampleExample 3: an exam-style question

A movie theater's self-service kiosk records how many tickets each transaction buys. Let XX be the number of tickets in a randomly selected transaction. The distribution of XX is shown in the table.

x12345P(X=x)0.300.400.120.15k\begin{array}{l|ccccc} x & 1 & 2 & 3 & 4 & 5 \\ \hline P(X = x) & 0.30 & 0.40 & 0.12 & 0.15 & k \end{array}

(a) Find kk, and find the probability that a randomly selected transaction buys at least 3 tickets.

(b) Calculate and interpret the mean of XX.

(c) Calculate and interpret the standard deviation of XX.

(d) Every ticket costs $12. The theater manager claims that the mean amount spent per kiosk transaction is more than $25. Is the claim supported? Justify your answer.

Show solution

(a) The probabilities must add to 1: k=1−(0.30+0.40+0.12+0.15)=0.03k = 1 - (0.30 + 0.40 + 0.12 + 0.15) = 0.03. Then P(X≥3)=0.12+0.15+0.03=0.30P(X \ge 3) = 0.12 + 0.15 + 0.03 = 0.30.

(b) μX=1(0.30)+2(0.40)+3(0.12)+4(0.15)+5(0.03)=0.30+0.80+0.36+0.60+0.15=2.21\mu_X = 1(0.30) + 2(0.40) + 3(0.12) + 4(0.15) + 5(0.03) = 0.30 + 0.80 + 0.36 + 0.60 + 0.15 = 2.21 tickets. If many, many kiosk transactions are randomly selected, the average number of tickets per transaction will be about 2.21 tickets.

(c)

σX=(1−2.21)2(0.30)+(2−2.21)2(0.40)+(3−2.21)2(0.12)+(4−2.21)2(0.15)+(5−2.21)2(0.03)=1.2459≈1.12 tickets.\sigma_X = \sqrt{(1 - 2.21)^2(0.30) + (2 - 2.21)^2(0.40) + (3 - 2.21)^2(0.12) + (4 - 2.21)^2(0.15) + (5 - 2.21)^2(0.03)} = \sqrt{1.2459} \approx 1.12 \text{ tickets.}

The number of tickets bought in a kiosk transaction typically varies from the mean of 2.21 tickets by about 1.12 tickets.

(d) The amount spent is $12 times the number of tickets, so its possible values are $12, $24, $36, $48 and $60 with the same probabilities. Its mean is

12(0.30)+24(0.40)+36(0.12)+48(0.15)+60(0.03)=$26.52.12(0.30) + 24(0.40) + 36(0.12) + 48(0.15) + 60(0.03) = \$26.52.

Because $26.52 is greater than $25, the claim is supported. Notice what the mean does and doesn't say: only 30% of transactions (those with 3 or more tickets, from part (a)) spend more than $25. The few large transactions pull the mean above $25 even though most transactions spend less.

Where students lose points

On the exam

Expected value and standard deviation questions appear in multiple choice and as one or two parts of a free-response question. Show the formula with your values substituted before giving the answer, so a slip with the calculator still earns the method. Interpretations need three things: the long-run wording, the context, and the units. Many problems also hide a missing probability: find it first from the fact that the probabilities sum to 1.

Check yourself

  1. Question 1

    Which of the following is a parameter?

    1. A

      The mean number of hours of sleep reported by 50 randomly chosen students at a school

    2. B

      The expected number of heads when a fair coin is flipped 4 times

    3. C

      The proportion of heads in 4 flips of a fair coin that you just carried out

    4. D

      The standard deviation of the weights of 12 apples picked from a crate

    Show answer

    B

    The expected number of heads, 4(0.5)=24(0.5) = 2, is fixed by the distribution of the number of heads; it never changes. A, C and D are each computed from one particular sample or set of flips and would change if you repeated the sampling, so they are statistics. C is tempting because the coin is fair, but the observed proportion in your 4 flips is a result, not a property of the distribution.

  2. Question 2

    A bonus question on a quiz is worth 0, 2 or 5 points. For a randomly selected student, the points earned BB have P(B=0)=0.5P(B = 0) = 0.5, P(B=2)=0.3P(B = 2) = 0.3 and P(B=5)=0.2P(B = 5) = 0.2. Find the mean and standard deviation of BB.

    Show answer

    μB=1.6\mu_B = 1.6 points and σB=3.64≈1.91\sigma_B = \sqrt{3.64} \approx 1.91 points.

    μB=0(0.5)+2(0.3)+5(0.2)=1.6\mu_B = 0(0.5) + 2(0.3) + 5(0.2) = 1.6. The variance is (0−1.6)2(0.5)+(2−1.6)2(0.3)+(5−1.6)2(0.2)=1.28+0.048+2.312=3.64(0 - 1.6)^2(0.5) + (2 - 1.6)^2(0.3) + (5 - 1.6)^2(0.2) = 1.28 + 0.048 + 2.312 = 3.64, and the standard deviation is its square root.

  3. Question 3

    Let DD be the number of school days a randomly selected student at a large high school misses in a month. The distribution of DD has mean 0.9 days and standard deviation 1.3 days. Which is the best interpretation of the standard deviation?

    1. A

      Every student misses between 0 and 2.2 days in a month

    2. B

      A typical student misses about 1.3 days in a month

    3. C

      Over many randomly selected students and months, the number of days missed typically varies from the mean of 0.9 days by about 1.3 days

    4. D

      The number of days a student misses in a month has a variance of 1.3 days

    Show answer

    C

    The standard deviation is a typical distance from the mean over the long run, stated in context with units. A treats it as a guaranteed range (and some students miss more than 2.2 days). B describes a center, not spread, and D confuses the standard deviation with the variance, which would be 1.32=1.691.3^2 = 1.69 days squared.

  4. Question 4

    Random variables AA and BB both take the values 1, 2 and 3. For AA, the probabilities are 0.1, 0.8 and 0.1. For BB, they are 0.45, 0.10 and 0.45. Which statement is true?

    1. A

      AA and BB have the same mean, and BB has the larger standard deviation

    2. B

      AA and BB have the same mean, and AA has the larger standard deviation

    3. C

      AA and BB have the same standard deviation, because they have the same possible values

    4. D

      BB has the larger mean, because it puts more probability on the value 3

    Show answer

    A

    Both distributions are symmetric about 2, so both means are 2. BB puts 90% of its probability at 1 and 3, one unit from the mean, so its standard deviation is 0.9≈0.95\sqrt{0.9} \approx 0.95; AA keeps 80% at the mean, so its standard deviation is only 0.2≈0.45\sqrt{0.2} \approx 0.45. C is tempting, but spread depends on the probabilities, not just the list of values. D ignores the equal weight BB puts on 1.

Go deeper