
define a random variable, build its probability distribution from theoretical or empirical probabilities, and compute and interpret its expected value, variance and standard deviation.
Instruction
A random variable assigns a number to each outcome of a chance process (enrichment). It turns events into quantities we can average. A discrete random variable has a list of possible values, and its probability distribution gives each value’s probability. The probabilities are between 0 and 1 and sum to 1.
A theoretical distribution (enrichment). Roll two fair dice and let X = the sum. Of the 36 equally likely outcomes, 1 gives 2, 2 give 3, and so on up to 6 giving 7, then back down to 1 giving 12. So P(X = 7) = 6/36, P(X = 4) = 3/36, and so on. Graph it as a probability histogram: it is symmetric, with a peak at 7.
Expected value (enrichment, PS.5). The mean of a random variable is the probability-weighted average of its values:
E(X) = μX = Σ x·P(x)
For the dice, E(X) = 2(1/36) + 3(2/36) + … + 12(1/36) = 252/36 = 7. Interpretation: over a very long run of rolls, the average sum approaches 7. The expected value need not be a possible value. For a single die, it is 3.5.
Variance (PS.6).
Var(X) = σ2 = Σ (x − μ)2·P(x) = E(X2) − μ2
For the dice sum, E(X2) = 1,974/36 ≈ 54.83, so Var(X) = 54.83 − 49 = 35/6 ≈ 5.83 and σ ≈ 2.42. Unlike the sample variance in Unit 1, there is no n − 1 here: this is the variance of a model, weighted by probabilities.
An empirical distribution (enrichment). Sometimes probabilities come from data rather than theory. Using NOAA daily records for St. Louis Lambert International Airport (USW00013994), split January 1-28 of each year from 2000 to 2024 into four 7-day weeks, giving 100 weeks. Let Y = the number of rainy days (at least 0.01 in) in a week. The observed distribution:
| y | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
|---|---|---|---|---|---|---|---|---|
| weeks | 17 | 22 | 28 | 17 | 13 | 0 | 3 | 0 |
| P(y) | 0.17 | 0.22 | 0.28 | 0.17 | 0.13 | 0.00 | 0.03 | 0.00 |
E(Y) = 0(0.17) + 1(0.22) + 2(0.28) + 3(0.17) + 4(0.13) + 5(0.00) + 6(0.03) + 7(0.00) = 1.99 rainy days per January week. E(Y2) = 6.03, so Var(Y) = 6.03 − 1.992 ≈ 2.07 and σ ≈ 1.44 days. The graph is lumpy: the tallest bar is at 2, a sixth of weeks were completely dry, no week had exactly 5 rainy days, yet three weeks had 6. A hundred weeks is a small sample, so some ragged bars are chance. Hold on to the spread. In Lesson 4.4 a standard model will match the average but understate the spread, and the reason is the persistence you found in Lesson 4.1.
Rules for transformed variables. If Y = a + bX, then E(Y) = a + b·E(X) and SD(Y) = |b|·SD(X), the same pattern as changing units in Unit 1. If a game pays $3 per point of the dice sum minus a $20 entry fee, then W = 3X − 20 has E(W) = 3(7) − 20 = $1 and SD(W) = 3(2.42) ≈ $7.25.
In the discourse lab, record (or write) a 90-second explanation of what “expected value 1.99 rainy days” means and what it does not mean. You will never see 1.99 rainy days in a week. Then respond to this model explanation, which a student wrote:
“E(Y) = 1.99 means that every January week in St. Louis has about 2 rainy days. And σ = 1.44 means that no week ever has more than 1.44 days more or fewer than the mean.”
Find the two errors and correct them. (Answer to check against: the mean is a long-run average, not what each week does; the data show weeks from 0 to 6 rainy days. The standard deviation is a typical distance from the mean, not a maximum: 1.44 days is a typical gap, and a week with 6 rainy days is 2.8 standard deviations above the mean.) If you can, say your corrected version aloud to a parent or guardian.
📖 Read for this lesson
The reading opens over the lesson; close it to come back to exactly where you were. The checks below draw on it.
Formative check
Work through these before moving on. They are not graded — they tell you whether the standard below has landed yet.
For the January-week distribution (P(0)=0.17, P(1)=0.22, P(2)=0.28, P(3)=0.17, P(4)=0.13, P(5)=0.00, P(6)=0.03, P(7)=0.00), what is E(Y)?
An expected value of 1.99 rainy days means that most January weeks have 2 or 3 rainy days.
For the sum of two fair dice, E(X) = and Var(X) = 35/6, so the standard deviation is about .
Record (or write) a 90-second explanation of what E(Y) = 1.99 and σ = 1.44 mean for St. Louis January weeks, using the graph. Then compare it with the model explanation in the lesson: what did yours include that it left out, and what did it miss? Finally, define your own random variable from a NOAA daily dataset (for example, the number of days of 90°F or higher in a July week at Kansas City, whose weeks are in the reading), build its empirical distribution and compute its mean and SD. Optionally explain your result to a parent or guardian and write down one question they asked.
How confident are you that you can build a probability distribution and compute and interpret its expected value and standard deviation?
Practice
Work these on paper or in your notebook, then open Check your answer. Aim for all of Fluency and Application; try at least one Challenge.
Printable version: this unit’s practice workbook (PDF)
Fluency
Build speed and accuracy with the core skill.
- A game pays −5 with probability 3/11; 10 with probability 4/11; 25 with probability 3/11; 50 with probability 1/11. Find the expected value.
Check your answer
Answer: 150/11 ≈ 13.64Multiply each value by its probability and add. - A game pays 0 with probability 2/11; 10 with probability 6/11; 40 with probability 1/11; 55 with probability 2/11. Find the expected value.
Check your answer
Answer: 210/11 ≈ 19.09Multiply each value by its probability and add. - A game pays −10 with probability 5/14; −5 with probability 3/7; 0 with probability 3/14. Find the expected value.
Check your answer
Answer: −40/7 ≈ −5.71Multiply each value by its probability and add. - A game pays −5 with probability 1/4; 5 with probability 1/8; 40 with probability 5/8. Find the expected value.
Check your answer
Answer: 195/8 ≈ 24.38Multiply each value by its probability and add. - A game pays 10 with probability 5/17; 20 with probability 4/17; 30 with probability 3/17; 35 with probability 5/17. Find the expected value.
Check your answer
Answer: 395/17 ≈ 23.24Multiply each value by its probability and add. - Two fair dice are rolled. Find P(sum ≥ 11).
Check your answer
Answer: 1/12Count outcomes in the 36-outcome sample space. - Two fair dice are rolled. Find P(at least one die shows 1).
Check your answer
Answer: 11/36Count outcomes in the 36-outcome sample space. - A random variable takes values 0, 1, 2 with probabilities 0.5, 0.3, 0.2. Find its mean and standard deviation.
Check your answer
Answer: μ = 0.7; σ² = 0.61; σ ≈ 0.781.E(X²) = 1.1.
Application
Use the skill in context. Show your reasoning.
- Kansas City International (NOAA), July 1-28 of each year 2000-2024, split into four 7-day weeks (100 weeks). Let Y = the number of days at or above 95°F in a week. Counts for y = 0,…,7: 53, 14, 15, 6, 4, 3, 3, 2. Find the probability distribution, E(Y) and SD(Y).
Check your answer
Answer: P(y) = counts/100; E(Y) = 1.25 days; Var(Y) ≈ 3.1675; SD ≈ 1.780 days.E(Y²) = 4.73. - Interpret E(Y) = 1.25 for Kansas City July weeks (95°F or higher), and say what the shape of the distribution adds.
Check your answer
Answer: Over many July weeks, the average is about 1.25 days of 95°F heat. The distribution is very lopsided: 53 of the 100 weeks had none, while 2 had all seven, so a typical week is far from the mean and the mean is not a ‘typical’ week. - A heat-safety program pays for cooling-center hours: $500 per week plus $300 for each 95°F day. Using E(Y) and SD(Y) from above, find the mean and SD of the weekly cost W = 500 + 300Y.
Check your answer
Answer: E(W) = $875.00; SD(W) ≈ $533.92.E(a + bY) = a + bE(Y); SD(a + bY) = |b|SD(Y).
Challenge
Stretch problems. Expect to think before you write.
- For the sum X of two fair dice, compute Var(X) both as Σ(x − μ)²P(x) and as E(X²) − μ², and show they agree.
Check your answer
Answer: Σ(x − 7)²P(x) = (25·1 + 16·2 + 9·3 + 4·4 + 1·5 + 0 + 1·5 + 4·4 + 9·3 + 16·2 + 25·1)/36 = 210/36 = 35/6; E(X²) = 1,974/36 and 1,974/36 − 49 = 210/36 = 35/6 ≈ 5.83.
Review
Keep earlier skills sharp.
- (Lesson 4.2) How many 3-person committees can be chosen from 10 people?
Check your answer
Answer: 120.C(10, 3). - (Unit 1) Is the Kansas City weekly distribution above better summarized by its mean or its median, and why might neither be ‘typical’?
Check your answer
Answer: It is strongly right-skewed: more than half the weeks (53%) had 0 hot days, so the median is 0 while the mean is 1.25. The mean is pulled up by a few hot weeks, the median ignores them, and neither describes the hot weeks, which are the ones that matter for the program.
Two Hundred Weeks: Rainy Days in St. Louis Januaries and 90-Degree Days in Kansas City Julys
NOAA NCEI GHCN-Daily: daily precipitation at USW00013994 (St. Louis Lambert International Airport), January 1-28, 2000-2024, and daily maximum temperature at USW00003947 (Kansas City International Airport), July 1-28, 2000-2024, grouped into 100 seven-day weeks each; retrieved November 10, 2026 · Public domain (works of the United States government)
Why this reading. The lesson builds an empirical distribution from 100 St. Louis January weeks and then asks you to define your own random variable from a NOAA daily dataset, suggesting hot days in a Kansas City July week. Both sets of 100 weeks are here, week by week, so the lesson’s distribution can be rebuilt by counting and the Kansas City one built for the first time. Each week is printed as a seven-character pattern, one character per day.
Table A. Rainy days in St. Louis January weeks, 2000-2024
NOAA GHCN-Daily, St. Louis Lambert International Airport (USW00013994). January 1-7, 8-14, 15-21 and 22-28 of each year; R marks a day with PRCP ≥ 0.01 in (rain, or the water in melted snow), a dot a dry day; the number after each pattern is the week’s count, Y. No day is missing. Retrieved November 10, 2026.
| Year | Jan 1-7 | Jan 8-14 | Jan 15-21 | Jan 22-28 |
|---|---|---|---|---|
| 2000 | ..R.... 1 | RRR.... 3 | ..R.R.. 2 | RR....R 3 |
| 2001 | ....... 0 | ...RRRR 4 | ....R.. 1 | ....R.R 2 |
| 2002 | ....RR. 2 | ....... 0 | ...RR.. 2 | .R..... 1 |
| 2003 | RR..... 2 | ....... 0 | .R.R... 2 | R...... 1 |
| 2004 | R.RR... 3 | ....... 0 | .RR.... 2 | ...RRR. 3 |
| 2005 | RRRRR.R 6 | ...RRR. 3 | RR..... 2 | ......R 1 |
| 2006 | .R..... 1 | ..R..R. 2 | .R...R. 2 | ......R 1 |
| 2007 | ...R..R 2 | .R..RRR 4 | R....RR 3 | ......R 1 |
| 2008 | ....... 0 | R.R.... 2 | ......R 1 | ....... 0 |
| 2009 | .....R. 1 | ..R.... 1 | ....... 0 | ...RRRR 4 |
| 2010 | R....RR 3 | ....... 0 | .....RR 2 | .RR.RR. 4 |
| 2011 | ......R 1 | ..RR... 2 | ..RRRR. 4 | .RR.... 2 |
| 2012 | ....... 0 | ...RR.. 2 | ..R.... 1 | ...RRRR 4 |
| 2013 | ....... 0 | ..R.R.. 2 | ....... 0 | R....R. 2 |
| 2014 | RR..R.. 3 | .RRR..R 4 | .R.R..R 3 | ....... 0 |
| 2015 | RRRR.RR 6 | ...RR.. 2 | ....... 0 | ...R... 1 |
| 2016 | ......R 1 | RR..... 2 | R.R.RR. 4 | ....... 0 |
| 2017 | .RR.R.. 3 | ..R..RR 3 | RR..R.. 3 | ....... 0 |
| 2018 | ......R 1 | ...R..R 2 | R...... 1 | RR..... 2 |
| 2019 | ......R 1 | ...RRR. 3 | ..RRRR. 4 | RR....R 3 |
| 2020 | ....... 0 | .RRR... 3 | R.RR... 3 | RRR...R 4 |
| 2021 | R...... 1 | ......R 1 | R.RR... 3 | ...R.R. 2 |
| 2022 | R...... 1 | RR...RR 4 | RR..... 2 | ....... 0 |
| 2023 | .RR.... 2 | ....R.. 1 | .R.R... 2 | ..RR... 2 |
| 2024 | ....RR. 2 | RR..RR. 4 | RR.RR.. 4 | RRRR.RR 6 |
Count the weeks by Y and you get the lesson’s row: 17, 22, 28, 17, 13, 0, 3, 0 for Y = 0 to 7. The 700 days contain 199 rainy ones, p = 0.2843. E(Y) = Σ y·P(y) = 1.99; E(Y²) = Σ y²·P(y) = 0.00 + 0.22 + 1.12 + 1.53 + 2.08 + 0.00 + 1.08 + 0.00 = 6.03; Var(Y) = 6.03 − 1.99² = 2.07; σ = 1.44 days. Look at the patterns, not just the counts: rainy days often come in runs (RRR...., .RRRR.. style stretches), which is the persistence of Lesson 4.1 written out, and the reason Lesson 4.4’s binomial model will understate the spread.
Table B. Days of 90°F or more in Kansas City July weeks, 2000-2024
NOAA GHCN-Daily, Kansas City International Airport (USW00003947), daily maximum temperature TMAX. July 1-7, 8-14, 15-21 and 22-28; H marks a day with TMAX ≥ 90°F. No day is missing. Retrieved November 10, 2026. Let W = the number of such days in a week.
| Year | Jul 1-7 | Jul 8-14 | Jul 15-21 | Jul 22-28 |
|---|---|---|---|---|
| 2000 | ....HHH 3 | HHHH..H 5 | HH..... 2 | ....... 0 |
| 2001 | H.HH.HH 5 | HHH.... 3 | ..HHHHH 5 | H.H.... 2 |
| 2002 | ....HHH 3 | HH..... 2 | .HHHHHH 6 | H.HHHHH 6 |
| 2003 | .HHHHHH 6 | HH.H.HH 5 | HHHHHHH 7 | ...HHH. 3 |
| 2004 | ....... 0 | ...HHH. 3 | .....H. 1 | ....... 0 |
| 2005 | ....... 0 | .HHH.HH 5 | HHH..HH 5 | HHHH... 4 |
| 2006 | HHH.... 3 | ....HHH 3 | HHHHHH. 6 | ..HHH.H 4 |
| 2007 | ....H.H 2 | HH....H 3 | HHHH... 4 | ....HHH 3 |
| 2008 | .....HH 2 | ....... 0 | ..H.HHH 4 | .....H. 1 |
| 2009 | ....... 0 | .H.H... 2 | ....... 0 | ..H.... 1 |
| 2010 | ....... 0 | .....HH 2 | .HHHHH. 5 | HHH.HHH 6 |
| 2011 | H...H.. 2 | ..HHH.. 3 | HHHHHHH 7 | HHHHHHH 7 |
| 2012 | HHHHHHH 7 | .HHHH.H 5 | HHHHHHH 7 | HHHHHHH 7 |
| 2013 | ......H 1 | HHH.... 3 | .HHHH.. 4 | H...... 1 |
| 2014 | ......H 1 | ....H.. 1 | ......H 1 | H..H... 2 |
| 2015 | ....... 0 | ...HHHH 4 | .HHH... 3 | ..H.HHH 4 |
| 2016 | ....H.H 2 | H.HH... 3 | ..HHHHH 5 | HHH..H. 4 |
| 2017 | ....... 0 | .HHHH.. 4 | HHHHHHH 7 | HH.H... 3 |
| 2018 | ..HHHH. 4 | HHHHHH. 6 | HH..H.. 3 | ...H... 1 |
| 2019 | HH..... 2 | .H....H 2 | .HHHHH. 5 | ......H 1 |
| 2020 | ....HHH 3 | H.HH.HH 5 | ..HH... 2 | HHHHH.. 5 |
| 2021 | ....... 0 | .H....H 2 | ......H 1 | .HHHHHH 6 |
| 2022 | ...HH.. 2 | ..HH.HH 4 | H..HHHH 5 | HHH.... 3 |
| 2023 | ..HH... 2 | ...HHHH 4 | ....... 0 | .HHHHHH 6 |
| 2024 | .H..... 1 | .....HH 2 | H...... 1 | ...HH.. 2 |
Build the distribution of W yourself before reading on. The counts for W = 0 to 7 are 12, 13, 18, 17, 12, 13, 8, 7: spread across the whole range, with no single pile. Of 700 days, 310 reached 90°F, p = 0.4429. E(W) = 3.10 days, E(W²) = 13.86, Var(W) = 4.25, σ = 2.06 days.
Why 90°F. A random variable is only interesting if it varies, so the threshold matters. At 100°F, Kansas City reached that mark on only 26 of the 700 July days and 89 of the 100 weeks had none, so the distribution collapses onto W = 0 (counts 89, 4, 2, 3, 1, 1, 0, 0). At 95°F it spreads more but is still top-heavy: counts 53, 14, 15, 6, 4, 3, 3, 2 for 0 to 7 days, p = 0.1786, E = 1.25, σ = 1.78 (the practice set uses this 95°F version). At 90°F, about four July days in ten qualify and the weeks fall all along 0 to 7.
What to do
- Rebuild the Table A distribution by counting, and check E(Y) = 1.99 and σ = 1.44.
- Build the distribution of W from Table B, graph it as a probability histogram beside Y’s, and compute E(W) and σW. Check against the values above.
- Record or write the 90-second explanation of what E(Y) = 1.99 and σ = 1.44 mean and do not mean, using the graph. Then compare it with the model explanation in the lesson. Finally, explain in one sentence why W’s standard deviation is larger than Y’s even though both count days out of seven.
Sources: NOAA National Centers for Environmental Information, GHCN-Daily (Daily Summaries), station USW00013994, St. Louis Lambert International Airport (the query used here) (ncei.noaa.gov); NOAA National Centers for Environmental Information, GHCN-Daily (Daily Summaries), station USW00003947, Kansas City International Airport (the query used here) (ncei.noaa.gov)