
estimate population parameters from a random sample with confidence intervals, check conditions, plan sample size, and report the estimates with their limits.
Instruction
The task. Estimate at least one population proportion and one population mean from a random sample, and report what you can and cannot claim.
Route 1: a known population (recommended). Use the 200-day sample hosted in this lesson’s reading (or, if you prefer your own station, a NOAA GHCN-Daily file for a Missouri station over at least 10 years from ncei.noaa.gov). Every day is a case. Draw a simple random sample of days (between 40 and 200) with a random number generator, and estimate, for example, the proportion of days at or above 90°F, the proportion of rainy days, or the mean daily high. Because you have the whole population, you can also check whether your intervals captured the parameters and simulate your method’s capture rate, which a real survey never can.
Route 2: an anonymous survey. With a parent or guardian’s approval, survey a random sample of at least 30 people from a list you can legitimately obtain (for example the members of a club, a congregation or a neighborhood association, with the organization’s permission) on a non-sensitive question (such as hours of sleep on a weeknight, or whether they use public transit), with no names collected. Route 2 has a real unknown parameter, and it will also have real nonresponse. Describe it.
Required analysis.
- Define each parameter in words and symbols.
- Describe the sampling method exactly, including the tool and seed or procedure.
- Check the conditions: random, 10%, and large counts (proportion) or normal/large sample (mean), with a graph of the sample.
- Construct 95% intervals by hand and confirm them with technology (spreadsheet CONFIDENCE.T and NORM.S.INV, GeoGebra, CODAP, or Python).
- Interpret each interval and the confidence level correctly.
- Compute the sample size needed to halve each margin of error, and explain why it is about four times as large.
- Route 1: compare with the true parameters and simulate at least 200 intervals to estimate the capture rate. Route 2: report the response rate and discuss nonresponse.
- Name at least two errors your margins of error do not cover.
A model paragraph. “A simple random sample of 200 days from St. Louis’s 2000-2024 record contained 66 rainy days, so p̂ = 0.330. The sample is random, 200 is under 10% of 9,132 days, and there are 66 successes and 134 failures, so a one-proportion z-interval is appropriate. We are 95% confident that between 26.5% and 39.5% of days in 2000-2024 had measurable rain. The population value, 31.17%, lies inside the interval. Simulating 10,000 such intervals, 94.5% captured it, consistent with the 95% level.”
The defense. Four minutes: your parameters, one interval with its interpretation, and one limitation. Expect a question such as “what does 95% mean here?” and answer it without the word “probability” applied to the parameter.
📖 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.
Your 95% margin of error for a mean is ±3.6°F with n = 30. About what n would give ±1.8°F?
If your 95% interval did not capture the known population mean, your computation must be wrong.
Stage 1 plan: state your route, define your two parameters in words and symbols, describe your population and sampling procedure (tool and seed), give your sample size with a reason, and list the conditions you will check.
How confident are you that you can carry out, interpret and defend an estimation study with honest limits?
Unit 2 checkpoint
Do this before you start the task. It covers the whole unit and tells you what to review first.
With 66 rainy days in a sample of 200, p̂ = .
Which is a correct interpretation of a 95% confidence level?
Doubling the sample size halves the margin of error.
For a 95% margin of error of ±3 points with p* = 0.5, n = .
A 95% interval for a mean with n = 30 and unknown σ should use…
A margin of error covers bias from nonresponse.
An ACS margin of ±2.0 points (90%) corresponds to a 95% margin of about points.
St. Louis and Springfield temperatures in the same 30 years: which procedure?
An observational interval for a difference between eras excludes 0. What can you conclude?
If two 95% confidence intervals overlap, the difference between the groups cannot be significant.
A sample of 30 daily highs has x̄ = 61.20 and s = 22.596; the SE is about .
Which condition is NOT required for a one-proportion z-interval?
Submit: Estimation Study (1,300-1,600 words) + four-minute defense
Task: Estimate a population proportion and a population mean from a random sample (Route 1: the 200-day random sample of St. Louis days hosted in this lesson’s reading, NOAA GHCN-Daily 2000-2024, retrieved 2026-11-10, with the whole-record parameters printed beside it for the capture check, or a sample you draw yourself from a NOAA daily file; Route 2: an anonymous survey approved by a parent or guardian), with 95% confidence intervals, conditions, sample-size planning and an error analysis. Tools: spreadsheet, CODAP, GeoGebra Probability, or optionally Python in JupyterLite. Hand computation with a printed table is fully acceptable.
Submission workflow
- Stage 1 — Plan. Route, parameters, population and frame, sample size and sampling procedure; for Route 2, the questions and the privacy plan (a parent or guardian’s approval required).
- Stage 2 — Self-checked draft. Recompute one interval and every condition statement and interpretation yourself from your notes, or ask a parent or guardian to repeat one calculation and read your conditions and interpretations; submit those notes and your revision plan.
- Stage 3 — Final report. 1,300-1,600 words with intervals, conditions, interpretations, sample-size plan, capture check or nonresponse analysis, and error discussion.
- Stage 4 — Defense. Four minutes, recorded or live for a parent or guardian, answering a question about the meaning of confidence.
How it is scored
| Criterion | What proficient looks like |
|---|---|
| Intervals (PS.17) | Correct z- and t-intervals, computed by hand and confirmed with technology. |
| Conditions (A2.DS.A.4 / A2.DS.A.5) | Random, 10% and shape or count conditions checked with evidence. |
| Interpretation (A2.DS.A.1) | Intervals and confidence level interpreted correctly in context. |
| Sampling distributions (PS.16) | Sample-size plan and the 1/√n relationship explained; capture rate or nonresponse analyzed. |
| Error analysis (A2.DS.A.7) | Nonsampling errors identified and their likely direction discussed. |
| Communication (MP.4, MP.6) | Precise language and units; clear report and defense. |
Two Hundred Days Drawn at Random: The Sample for an Estimation Study, with the Truth to Check It Against
NOAA NCEI GHCN-Daily, station USW00013994 (St. Louis Lambert International Airport), elements TMAX and PRCP, 2000-2024; simple random sample of 200 days drawn for this course with Python’s random module, seed 5; population parameters computed from the whole record; retrieved 2026-11-10 · Public domain (works of the United States government), with an SLS original sample and computation
Why this reading. Route 1 of the estimation study asks you to estimate a proportion and a mean from a random sample of 40 to 200 days from a NOAA daily record. This reading is that sample, and it is a full route in its own right: 200 days drawn at random from the St. Louis 2000–2024 record, with the date, the daily high and the precipitation for each, and the population parameters you will need to check your intervals against. Both intervals are worked, so you can see what a finished version looks like before you do your own.
How the sample was drawn
The population is every day from January 1, 2000 to December 31, 2024 at station USW00013994 (St. Louis Lambert International Airport) with both PRCP and TMAX recorded: 9,132 days (none of the 9,132 days lacks either value). The days were numbered 0 to 9131 in date order and 200 were chosen without replacement by random.Random(5).sample(range(9132), 200), then sorted by date for printing. Retrieved 2026-11-10.
Population parameters (from the whole record)
| Parameter | Value |
|---|---|
| Proportion of days with measurable rain (PRCP ≥ 0.01), all 9,132 days | 2,846/9,132 = 0.3117 |
| Mean daily high (TMAX), all 9,132 days | μ = 67.59°F, σ = 20.05°F |
| Proportion of days with TMAX ≥ 90°F | 1,260/9,132 = 0.1380 |
Table 1. The sample: 200 days
TMAX in °F, PRCP in inches. Column groups: days 1–100 on the left, 101–200 on the right.
| # | Date | TMAX | PRCP | # | Date | TMAX | PRCP |
|---|---|---|---|---|---|---|---|
| 1 | 2000-01-30 | 27 | 0.03 | 101 | 2013-04-09 | 79 | 0.00 |
| 2 | 2000-02-25 | 73 | 0.20 | 102 | 2013-05-27 | 84 | 0.47 |
| 3 | 2000-03-28 | 56 | 0.00 | 103 | 2013-07-08 | 94 | 0.00 |
| 4 | 2000-05-28 | 66 | 0.00 | 104 | 2013-09-17 | 72 | 0.03 |
| 5 | 2000-07-08 | 91 | 0.00 | 105 | 2013-09-23 | 77 | 0.00 |
| 6 | 2000-08-02 | 90 | 0.00 | 106 | 2013-09-25 | 83 | 0.00 |
| 7 | 2000-10-23 | 81 | 0.00 | 107 | 2013-11-15 | 60 | 0.00 |
| 8 | 2000-12-19 | 15 | 0.00 | 108 | 2013-11-26 | 41 | 0.00 |
| 9 | 2001-01-09 | 35 | 0.00 | 109 | 2014-01-06 | 2 | 0.00 |
| 10 | 2001-04-20 | 74 | 0.00 | 110 | 2014-01-25 | 43 | 0.00 |
| 11 | 2001-06-05 | 87 | 0.00 | 111 | 2014-03-01 | 43 | 0.00 |
| 12 | 2001-06-20 | 80 | 0.21 | 112 | 2014-03-18 | 60 | 0.01 |
| 13 | 2001-07-16 | 90 | 0.00 | 113 | 2014-04-02 | 55 | 2.53 |
| 14 | 2001-08-23 | 82 | 0.80 | 114 | 2014-08-14 | 86 | 0.00 |
| 15 | 2002-02-04 | 31 | 0.00 | 115 | 2014-11-20 | 40 | 0.00 |
| 16 | 2002-03-06 | 67 | 0.00 | 116 | 2014-12-28 | 38 | 0.00 |
| 17 | 2002-04-29 | 70 | 0.00 | 117 | 2014-12-30 | 33 | 0.00 |
| 18 | 2002-07-01 | 94 | 0.00 | 118 | 2015-02-27 | 20 | 0.00 |
| 19 | 2002-07-22 | 100 | 0.09 | 119 | 2015-03-08 | 63 | 0.00 |
| 20 | 2002-08-20 | 88 | 0.02 | 120 | 2015-04-01 | 78 | 0.00 |
| 21 | 2002-10-30 | 47 | 0.05 | 121 | 2015-04-03 | 61 | 0.30 |
| 22 | 2002-12-03 | 32 | 0.00 | 122 | 2015-04-14 | 69 | 0.00 |
| 23 | 2002-12-17 | 63 | 0.01 | 123 | 2015-06-04 | 78 | 0.10 |
| 24 | 2003-03-24 | 79 | 0.00 | 124 | 2015-06-13 | 90 | 0.02 |
| 25 | 2003-07-05 | 95 | 0.00 | 125 | 2015-07-03 | 83 | 0.00 |
| 26 | 2003-08-19 | 92 | 0.00 | 126 | 2015-08-09 | 91 | 1.49 |
| 27 | 2003-12-31 | 56 | 0.00 | 127 | 2015-09-14 | 83 | 0.00 |
| 28 | 2004-02-02 | 38 | 0.64 | 128 | 2015-11-30 | 48 | 0.12 |
| 29 | 2004-02-17 | 43 | 0.00 | 129 | 2015-12-10 | 70 | 0.00 |
| 30 | 2004-07-28 | 84 | 0.00 | 130 | 2015-12-15 | 49 | 0.00 |
| 31 | 2004-10-13 | 64 | 0.03 | 131 | 2015-12-30 | 35 | 0.00 |
| 32 | 2004-11-05 | 59 | 0.00 | 132 | 2016-01-16 | 34 | 0.00 |
| 33 | 2005-01-18 | 32 | 0.00 | 133 | 2016-01-31 | 68 | 0.00 |
| 34 | 2005-01-28 | 33 | 0.05 | 134 | 2016-03-14 | 70 | 0.14 |
| 35 | 2005-05-04 | 68 | 0.00 | 135 | 2016-03-16 | 67 | 0.00 |
| 36 | 2005-09-06 | 89 | 0.00 | 136 | 2016-04-07 | 61 | 0.00 |
| 37 | 2005-11-09 | 72 | 0.00 | 137 | 2016-04-20 | 71 | 0.22 |
| 38 | 2005-12-06 | 27 | 0.00 | 138 | 2016-05-04 | 70 | 0.00 |
| 39 | 2005-12-15 | 43 | 0.00 | 139 | 2016-06-04 | 83 | 0.24 |
| 40 | 2006-03-23 | 46 | 0.00 | 140 | 2016-06-22 | 98 | 0.00 |
| 41 | 2006-05-02 | 76 | 0.00 | 141 | 2016-09-04 | 88 | 0.00 |
| 42 | 2006-05-13 | 54 | 0.00 | 142 | 2016-09-24 | 92 | 0.00 |
| 43 | 2006-07-13 | 96 | 0.74 | 143 | 2016-11-18 | 70 | 0.21 |
| 44 | 2006-07-15 | 96 | 0.00 | 144 | 2016-11-28 | 54 | 0.28 |
| 45 | 2006-07-28 | 96 | 0.00 | 145 | 2017-01-29 | 38 | 0.00 |
| 46 | 2006-08-25 | 82 | 0.06 | 146 | 2017-03-10 | 46 | 0.00 |
| 47 | 2006-09-05 | 76 | 0.03 | 147 | 2017-06-20 | 92 | 0.00 |
| 48 | 2006-09-11 | 81 | 0.39 | 148 | 2018-02-10 | 28 | 0.03 |
| 49 | 2007-01-13 | 33 | 0.29 | 149 | 2018-02-18 | 53 | 0.00 |
| 50 | 2007-02-27 | 48 | 0.00 | 150 | 2018-03-17 | 48 | 0.00 |
| 51 | 2007-03-31 | 71 | 0.55 | 151 | 2018-04-23 | 60 | 0.07 |
| 52 | 2007-06-10 | 74 | 0.00 | 152 | 2018-04-28 | 63 | 0.00 |
| 53 | 2007-06-12 | 88 | 0.00 | 153 | 2018-07-25 | 89 | 0.00 |
| 54 | 2007-06-15 | 93 | 0.00 | 154 | 2018-08-11 | 89 | 0.00 |
| 55 | 2007-06-20 | 85 | 0.00 | 155 | 2018-10-15 | 51 | 0.02 |
| 56 | 2007-07-28 | 88 | 0.00 | 156 | 2018-11-13 | 28 | 0.00 |
| 57 | 2007-08-05 | 97 | 0.00 | 157 | 2018-12-02 | 56 | 0.00 |
| 58 | 2007-09-26 | 70 | 0.01 | 158 | 2019-06-03 | 78 | 0.00 |
| 59 | 2007-11-25 | 37 | 0.17 | 159 | 2019-06-29 | 93 | 0.00 |
| 60 | 2007-12-17 | 38 | 0.00 | 160 | 2019-12-15 | 28 | 0.23 |
| 61 | 2008-01-05 | 58 | 0.00 | 161 | 2020-03-05 | 63 | 0.00 |
| 62 | 2008-01-18 | 43 | 0.00 | 162 | 2020-04-24 | 75 | 0.69 |
| 63 | 2008-01-30 | 30 | 0.00 | 163 | 2020-04-29 | 63 | 0.32 |
| 64 | 2008-02-12 | 23 | 0.00 | 164 | 2020-05-05 | 66 | 0.27 |
| 65 | 2008-02-24 | 39 | 0.10 | 165 | 2020-06-09 | 92 | 0.15 |
| 66 | 2008-03-02 | 78 | 0.00 | 166 | 2020-09-24 | 76 | 0.00 |
| 67 | 2008-04-15 | 63 | 0.00 | 167 | 2020-10-05 | 67 | 0.00 |
| 68 | 2008-10-24 | 54 | 0.10 | 168 | 2020-10-06 | 80 | 0.00 |
| 69 | 2008-10-30 | 73 | 0.00 | 169 | 2020-11-19 | 75 | 0.00 |
| 70 | 2008-12-02 | 48 | 0.00 | 170 | 2021-01-15 | 36 | 0.11 |
| 71 | 2009-03-09 | 56 | 0.07 | 171 | 2021-01-31 | 47 | 0.05 |
| 72 | 2009-04-15 | 63 | 0.00 | 172 | 2021-03-13 | 58 | 0.00 |
| 73 | 2009-05-08 | 73 | 0.67 | 173 | 2021-04-10 | 63 | 1.06 |
| 74 | 2009-05-24 | 85 | 0.03 | 174 | 2021-06-27 | 91 | 0.24 |
| 75 | 2009-08-31 | 73 | 0.00 | 175 | 2021-07-25 | 90 | 0.64 |
| 76 | 2009-09-20 | 69 | 0.95 | 176 | 2021-08-02 | 82 | 0.00 |
| 77 | 2010-08-24 | 89 | 0.00 | 177 | 2021-09-13 | 91 | 0.00 |
| 78 | 2011-01-14 | 38 | 0.00 | 178 | 2021-10-14 | 77 | 0.82 |
| 79 | 2011-01-22 | 34 | 0.00 | 179 | 2021-11-23 | 54 | 0.00 |
| 80 | 2011-03-04 | 71 | 1.36 | 180 | 2022-01-23 | 44 | 0.00 |
| 81 | 2011-03-09 | 49 | 0.00 | 181 | 2022-02-20 | 66 | 0.00 |
| 82 | 2011-03-23 | 75 | 0.00 | 182 | 2022-05-25 | 81 | 1.01 |
| 83 | 2011-03-31 | 54 | 0.00 | 183 | 2022-06-11 | 90 | 0.00 |
| 84 | 2011-04-03 | 90 | 0.00 | 184 | 2022-07-22 | 101 | 0.00 |
| 85 | 2011-06-17 | 80 | 1.12 | 185 | 2022-12-27 | 34 | 0.00 |
| 86 | 2011-06-29 | 87 | 0.00 | 186 | 2023-01-03 | 72 | 0.81 |
| 87 | 2011-11-01 | 75 | 0.00 | 187 | 2023-02-09 | 53 | 0.49 |
| 88 | 2011-11-18 | 58 | 0.00 | 188 | 2023-03-30 | 71 | 0.05 |
| 89 | 2012-03-19 | 82 | 0.00 | 189 | 2023-06-04 | 93 | 0.10 |
| 90 | 2012-04-11 | 57 | 0.00 | 190 | 2023-07-15 | 89 | 0.10 |
| 91 | 2012-04-14 | 80 | 1.30 | 191 | 2023-09-29 | 88 | 0.00 |
| 92 | 2012-04-16 | 68 | 0.00 | 192 | 2023-10-11 | 80 | 0.06 |
| 93 | 2012-05-13 | 77 | 0.00 | 193 | 2023-11-08 | 84 | 0.00 |
| 94 | 2012-07-15 | 96 | 0.00 | 194 | 2023-12-07 | 68 | 0.00 |
| 95 | 2012-08-06 | 95 | 0.00 | 195 | 2024-03-09 | 52 | 0.00 |
| 96 | 2012-12-15 | 65 | 0.35 | 196 | 2024-05-22 | 76 | 0.11 |
| 97 | 2012-12-22 | 47 | 0.00 | 197 | 2024-06-14 | 91 | 0.00 |
| 98 | 2013-01-20 | 47 | 0.00 | 198 | 2024-07-14 | 96 | 0.00 |
| 99 | 2013-03-07 | 46 | 0.00 | 199 | 2024-08-02 | 87 | 0.00 |
| 100 | 2013-03-23 | 54 | 0.06 | 200 | 2024-08-17 | 90 | 0.00 |
The two intervals, worked
Proportion. Rainy days: 66 of 200, p̂ = 0.330. Random: yes, by the stated procedure. 10%: 200 < 913. Large counts: 66 and 134. SE = √(0.330 × 0.670/200) = 0.0332; interval 0.330 ± 1.96(0.0332) = 0.265 to 0.395. The truth, 0.3117, is inside.
Mean. The 200 highs sum to 13,306, so x̄ = 66.53°F; s = 21.060°F. Their distribution:
| TMAX | 0–9 | 10–19 | 20–29 | 30–39 | 40–49 | 50–59 | 60–69 | 70–79 | 80–89 | 90–99 | 100–109 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Days | 1 | 1 | 7 | 20 | 21 | 20 | 27 | 36 | 35 | 30 | 2 |
Spread over a wide range with its peak in the 70s and 80s, skewed to the cold side, no outlier (the warmest day, 101°F on 2022-07-22, is a real heat day, not an error). With n = 200 the shape condition is comfortably met. SE = 21.060/√200 = 1.4892. df = 199; t* = 1.972 (1.984 at df 100 would be the conservative choice). Margin 2.937. Interval: 63.59 to 69.47°F. The truth, μ = 67.59, is inside.
A second proportion, if you want one with a smaller count. Days at or above 90°F: 32 of 200, p̂ = 0.160. Large counts: 32 successes, so the condition is met. The interval 0.160 ± 1.96√(0.160 × 0.840/200) = 0.109 to 0.211. The truth is 0.1380, inside.
Sample size, and the four-times rule
To halve the mean’s margin of 2.94, you need four times the sample: about 800 days. Check it with the formula, using the population σ as the planning value: n = (1.96 × 20.05/1.468)2 = 717. For the proportion, halving 0.065 to 0.0326 with p* = 0.330: n = (1.96/0.0326)2(0.330)(0.670) = 800. Both are about four times 200, because the margin shrinks as 1/√n.
The capture check and the error analysis
Route 1 asks you to simulate at least 200 intervals to estimate the capture rate. The Lesson 2.1 reading is that simulation, recorded: 40 intervals in full and the totals for 1,000 (950 of 1,000 at 95%). Cite it, and compute the standard error of the simulated capture rate yourself. For the error analysis, name what no margin covers here: the sample is of days at one airport, so it says nothing about the rest of Missouri; the instruments and the airport’s surroundings changed over 25 years; days next to each other are alike (the sample is random, but the population is not a list of independent values); and measuring rain to 0.01 inch has its own error, especially in snow. Say which of these could push your estimate up and which down.
Sources: NOAA NCEI, Daily Summaries (GHCN-Daily) data search (ncei.noaa.gov); NOAA NCEI Access Data Service (the query used here) (ncei.noaa.gov); Python documentation, the random module (docs.python.org)
Forty Intervals and Where They Landed: A Capture Record from a Known Population
Population: NOAA NCEI GHCN-Daily, station USW00013994 (St. Louis Lambert International Airport), PRCP, 2000-2024, N = 9,132 days; intervals generated for this course with Python’s random module, seed 2026; ACS 2023 broadband figure for Missouri from U.S. Census Bureau table B28002; retrieved 2026-11-10 · SLS original, with public domain NOAA and Census data
Why this reading. The lesson says that about 95% of simulated intervals captured the true proportion, and the lab asks you to build a few hundred such intervals in CODAP. A run you did not see, or a run only you have, is not something you can check. This one is. Forty intervals are printed with every intermediate number, from a stated seed on the stated population, so the arithmetic and the hits can be verified one row at a time; the same code run to 1,000 gives the totals at the end.
The population and the method
Population: the 9,132 days at St. Louis Lambert International Airport, 2000–2024 (NOAA GHCN-Daily PRCP, the same file as Lessons 1.4 and 2.1). A day is rainy if PRCP ≥ 0.01 in. True proportion p = 2,846/9,132 = 0.3117. Each sample: 200 days drawn with random.Random(2026).choices(population, k=200), the 40 samples taken in sequence from that one generator. For each sample, p̂ = x/200, SE = √(p̂(1 − p̂)/200), interval p̂ ± 1.96 SE. The last column reruns the same sample with 1.645.
Record: forty 95% intervals
| Sample | Rainy days x | p̂ | SE | Lower | Upper | Captures 0.3117? | 90% interval captures? |
|---|---|---|---|---|---|---|---|
| 1 | 61 | 0.305 | 0.0326 | 0.241 | 0.369 | yes | yes |
| 2 | 53 | 0.265 | 0.0312 | 0.204 | 0.326 | yes | yes |
| 3 | 58 | 0.290 | 0.0321 | 0.227 | 0.353 | yes | yes |
| 4 | 56 | 0.280 | 0.0317 | 0.218 | 0.342 | yes | yes |
| 5 | 47 | 0.235 | 0.0300 | 0.176 | 0.294 | no | no |
| 6 | 57 | 0.285 | 0.0319 | 0.222 | 0.348 | yes | yes |
| 7 | 49 | 0.245 | 0.0304 | 0.185 | 0.305 | no | no |
| 8 | 71 | 0.355 | 0.0338 | 0.289 | 0.421 | yes | yes |
| 9 | 60 | 0.300 | 0.0324 | 0.236 | 0.364 | yes | yes |
| 10 | 58 | 0.290 | 0.0321 | 0.227 | 0.353 | yes | yes |
| 11 | 62 | 0.310 | 0.0327 | 0.246 | 0.374 | yes | yes |
| 12 | 77 | 0.385 | 0.0344 | 0.318 | 0.452 | no | no |
| 13 | 68 | 0.340 | 0.0335 | 0.274 | 0.406 | yes | yes |
| 14 | 71 | 0.355 | 0.0338 | 0.289 | 0.421 | yes | yes |
| 15 | 64 | 0.320 | 0.0330 | 0.255 | 0.385 | yes | yes |
| 16 | 56 | 0.280 | 0.0317 | 0.218 | 0.342 | yes | yes |
| 17 | 65 | 0.325 | 0.0331 | 0.260 | 0.390 | yes | yes |
| 18 | 65 | 0.325 | 0.0331 | 0.260 | 0.390 | yes | yes |
| 19 | 66 | 0.330 | 0.0332 | 0.265 | 0.395 | yes | yes |
| 20 | 52 | 0.260 | 0.0310 | 0.199 | 0.321 | yes | no |
| 21 | 54 | 0.270 | 0.0314 | 0.208 | 0.332 | yes | yes |
| 22 | 60 | 0.300 | 0.0324 | 0.236 | 0.364 | yes | yes |
| 23 | 70 | 0.350 | 0.0337 | 0.284 | 0.416 | yes | yes |
| 24 | 62 | 0.310 | 0.0327 | 0.246 | 0.374 | yes | yes |
| 25 | 70 | 0.350 | 0.0337 | 0.284 | 0.416 | yes | yes |
| 26 | 64 | 0.320 | 0.0330 | 0.255 | 0.385 | yes | yes |
| 27 | 54 | 0.270 | 0.0314 | 0.208 | 0.332 | yes | yes |
| 28 | 67 | 0.335 | 0.0334 | 0.270 | 0.400 | yes | yes |
| 29 | 68 | 0.340 | 0.0335 | 0.274 | 0.406 | yes | yes |
| 30 | 61 | 0.305 | 0.0326 | 0.241 | 0.369 | yes | yes |
| 31 | 61 | 0.305 | 0.0326 | 0.241 | 0.369 | yes | yes |
| 32 | 72 | 0.360 | 0.0339 | 0.293 | 0.427 | yes | yes |
| 33 | 67 | 0.335 | 0.0334 | 0.270 | 0.400 | yes | yes |
| 34 | 62 | 0.310 | 0.0327 | 0.246 | 0.374 | yes | yes |
| 35 | 50 | 0.250 | 0.0306 | 0.190 | 0.310 | no | no |
| 36 | 62 | 0.310 | 0.0327 | 0.246 | 0.374 | yes | yes |
| 37 | 68 | 0.340 | 0.0335 | 0.274 | 0.406 | yes | yes |
| 38 | 60 | 0.300 | 0.0324 | 0.236 | 0.364 | yes | yes |
| 39 | 56 | 0.280 | 0.0317 | 0.218 | 0.342 | yes | yes |
| 40 | 62 | 0.310 | 0.0327 | 0.246 | 0.374 | yes | yes |
Check a row. Sample 5 had 47 rainy days: p̂ = 0.235, SE = √(0.235 × 0.765/200) = 0.0300, interval 0.176 to 0.294. Sample 12 had 77: interval 0.318 to 0.452. Both are random samples from one population, and the method is the same for each; the intervals differ because the samples differ. A row that says no was not computed wrongly. The method misses about one time in twenty, and those rows are the times.
Totals. 36 of 40 intervals captured 0.3117 (90.0%); the misses are samples 5, 7, 12, 35. At 90% confidence, 35 of 40 (87.5%). Average width: 0.128 at 95%, 0.107 at 90%, a ratio of 1.645/1.96 = 0.84, as the formula says. Forty is too few to pin down a capture rate: the standard error of a proportion near 0.95 from 40 trials is √(0.95 × 0.05/40) = 0.034, so 90.0% is within about 1.5 standard errors of 95%. Run the same code for 1,000 samples and the totals are 950 of 1,000 at 95% (95.0%) and 895 of 1,000 at 90% (89.5%). The lesson’s run of 10,000 gave 94.5%.
What to notice in the record
The intervals are not all the same width. SE depends on p̂, so a sample with 47 rainy days makes a narrower interval than one with 77. Every miss is a sample whose p̂ was far from p; narrow or wide, the interval is centered on the sample, and that is what fails.
“95% confident” is a statement about the column of yes/no answers, not about any one row. Before you look at the last column, each row has a 95% chance of saying yes. After you look, it says yes or no.
Every sample here passes the large-counts check: the smallest x is 47 and the largest is 77, so successes and failures are both at least 10 in all forty.
For the sample-size question
The open question asks for n at ±4 points with p* = 0.5 and with p* = 0.85. A real planning value for broadband: the Census Bureau’s 2023 American Community Survey estimates that 90.7% of Missouri households have a broadband subscription of some kind (2,319,607 of 2,556,271 households; table B28002; the Lesson 2.3 reading prints it county by county). With p* = 0.907, n = (1.96/0.04)2(0.907)(0.093) = 2,401 × 0.0840 = 201.7, so 202 households. For p* = 0.5 the same margin needs 601, and for p* = 0.85, 307. A good planning value for a proportion far from one half saves a great deal of work; a bad one gives a margin you did not promise.
Sources: NOAA NCEI, Daily Summaries (GHCN-Daily) data search (ncei.noaa.gov); NOAA NCEI Access Data Service (the query used here) (ncei.noaa.gov); Python documentation, the random module (docs.python.org); U.S. Census Bureau, ACS 2023 1-year summary file, table B28002 (www2.census.gov)