THE VR SCHOOL
  • Schools & Districts
    • License the academy
    • Free program for your students
    • Request a demo
  • Catalog
    • AI & Data
    • Cybersecurity & Web
    • Programming
    • Health Science
    • All Guilds
    • All courses
  • Families
  • Accreditation
  • Log In
  • Request a demo
  • Home
  • Courses

RLP Statistics B — Probability Models and Statistical Inference

Curriculum

  • 4 Sections
  • 20 Lessons
  • 10 Weeks
Expand all sectionsCollapse all sections
  • Unit 1: Continuous Distributions and Sampling Distributions
    5
    • 1.1
      Continuous Random Variables and Density Curves
      50 mins
    • 1.2
      The Normal Distribution
      50 mins
    • 1.3
      When Is a Normal Model Appropriate?
      50 mins
    • 1.4
      Sampling Distributions and the Central Limit Theorem
      50 mins
    • 1.5
      Performance Task — Sampling Distribution Simulation Study
      150 mins
  • Unit 2: Estimating with Confidence
    5
    • 2.1
      Estimating a Proportion with Confidence
      50 mins
    • 2.2
      Confidence Intervals for a Mean
      50 mins
    • 2.3
      What Confidence Means, and What It Does Not
      50 mins
    • 2.4
      Comparing Two Groups with Confidence Intervals
      50 mins
    • 2.5
      Performance Task — Estimation Study
      150 mins
  • Unit 3: Testing Claims: Significance Tests
    5
    • 3.1
      The Logic of a Significance Test
      50 mins
    • 3.2
      t-Tests for Means and Paired Data
      50 mins
    • 3.3
      Errors, Power and Significance in the Real World
      50 mins
    • 3.4
      Two-Sample Tests from Experiments and Observational Data
      50 mins
    • 3.5
      Performance Task — Significance Test Investigation
      150 mins
  • Unit 4: Chi-Square, Regression Inference and the Capstone Study
    5
    • 4.1
      Chi-Square Goodness of Fit
      50 mins
    • 4.2
      Chi-Square Tests for Two-Way Tables
      50 mins
    • 4.3
      Inference for the Slope of a Regression Line
      50 mins
    • 4.4
      Choosing the Right Procedure and Writing It Up
      50 mins
    • 4.5
      Capstone — Full Statistical Inference Study
      200 mins

Estimating a Proportion with Confidence

Unit 2  ·  Launch & Concept Development  ·  Lesson 6 of 20

Estimating a Proportion with Confidence

A2.DS.A.4 / A2.DS.A.5RLP-STATSB
Airport weather tokens are sampled randomly beside interval bars, most capturing the hidden population proportion.
By the end of this lesson I can…

construct a confidence interval for a population proportion, check its conditions, interpret the interval and the confidence level, and find the sample size for a desired margin of error.

Instruction

In RLP Statistics A you simulated a margin of error. Now the sampling distribution lets you compute one from a single sample.

The logic. For random samples, p̂ is approximately normal with mean p and standard deviation √(p(1 − p)/n). So in about 95% of samples, p̂ lands within 1.96 standard deviations of p. Turn that around: in about 95% of samples, p lies within 1.96 SDs of p̂. We don’t know p, so we estimate the SD with the standard error SE = √(p̂(1 − p̂)/n). The interval is

p̂ ± z*·√(p̂(1 − p̂)/n)

where z* = 1.645 for 90% confidence, 1.96 for 95% and 2.576 for 99%. The part after ± is the margin of error.

Worked example. The population is every day at St. Louis Lambert International Airport from 2000 to 2024 (NOAA GHCN-Daily, 9,132 days). A random sample of 200 days, drawn with a random number generator, contained 66 rainy days (at least 0.01 in).

  1. Parameter: p = the proportion of all days in 2000-2024 with measurable rain at St. Louis.
  2. Conditions: Random: a simple random sample. 10%: 200 is less than 10% of 9,132, so the observations are nearly independent. Large counts: 66 successes and 134 failures, both at least 10, so p̂ is approximately normal.
  3. Compute: p̂ = 66/200 = 0.330. SE = √(0.330 × 0.670/200) ≈ 0.0332. Margin = 1.96 × 0.0332 ≈ 0.065. Interval: 0.265 to 0.395.
  4. Interpret: We are 95% confident that between 26.5% and 39.5% of days at St. Louis in 2000-2024 had measurable rain.

Here we can check: the true p is 2,846/9,132 ≈ 0.3117, which is inside the interval. In real studies you never get to check. That is why the method’s track record matters.

What “95% confident” means. The confidence level describes the method, not this one interval. If we took many random samples and built an interval from each, about 95% of the intervals would capture p. A simulation of 10,000 samples of 200 St. Louis days did exactly this: 94.5% of the intervals captured 0.3117. Any single interval either captures p or does not. We just don’t know which, so we say “95% confident”, not “95% probability”.

What changes the width. Higher confidence means a larger z* and a wider interval. A larger n means a narrower interval, but only in proportion to 1/√n.

Choosing a sample size (PS.17). To get margin of error E, solve E = z*√(p*(1 − p*)/n) for n:

n = (z*/E)2 · p*(1 − p*)

If you have no prior guess, use p* = 0.5, which gives the largest n and so guarantees the margin. For a 95% margin of ±3 percentage points: n = (1.96/0.03)2(0.25) ≈ 1,067.1, so 1,068. Always round up. For ±5 points: 384.2, so 385. Halving the margin requires four times the sample, which is why national polls rarely go below ±3 points.

Plus-four note. When counts are small, a better interval adds 2 successes and 2 failures before computing (OpenStax covers this as the “plus-four” method). For this course, check the large-counts condition, and say so if it fails.

📖 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.

  • Forty Intervals and Where They Landed: A Capture Record from a Known PopulationPopulation: 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 · about 5 min

    Forty 95% intervals from a known population, every intermediate number printed, and the totals for 1,000: what ‘95% confident’ means, in rows you can verify. A real ACS planning value for the broadband question.

Vocabulary in context

  • confidence interval — An interval computed from sample data by a method that captures the parameter in a stated percentage of samples.
  • confidence level — The long-run success rate of the interval method, such as 95%.
  • standard error — An estimate of a statistic’s standard deviation computed from the sample, such as √(p̂(1 − p̂)/n).
  • critical value (z*) — The number of standard errors needed for a given confidence level: 1.645, 1.96 or 2.576 for 90%, 95% or 99%.
  • large-counts condition — For a proportion, at least 10 successes and 10 failures, so p̂ is approximately normal.

Formative check

Work through these before moving on. They are not graded — they tell you whether the standard below has landed yet.

Fill in the blank

With 66 rainy days in 200, p̂ = , SE ≈ 0.0332, and the 95% interval is 0.330 ± .

+50 XP

Which is a correct interpretation of the 95% confidence level?

The level describes the long-run success rate of the method. A specific interval either contains p or doesn’t.

Simulation & tools

How often do 95% intervals capture p?

Data: NOAA NCEI GHCN-Daily, St. Louis Lambert International Airport (USW00013994), 2000-2024 (same import URL as Unit 1, with attribute rainy = if(PRCP>=0.01,1,0)). The true p = 0.3117.

  1. Use the Sampler to draw 100 samples of 200 days, collecting the mean of rainy (p̂).
  2. In the collected table, add attributes lower = p̂ − 1.96·sqrt(p̂(1−p̂)/200), upper likewise, and hit = if(lower<=0.3117 and upper>=0.3117, 1, 0).
  3. Record the fraction of hits. Repeat the run ten times, or add the recorded run in this lesson’s reading, to reach at least 1,000 intervals. Compare with 95%.
  4. Change 1.96 to 1.645 and record the new capture rate and the average width.

Spreadsheet route: simulate samples with =RAND()<0.3117 in 200 cells per row (a binomial sample), compute each row’s interval and hit, and fill down 500 rows.

Open in a new tab ↗  ·  CODAP, Concord Consortium · MIT open source

A county agency wants to estimate the proportion of households with broadband internet to within ±4 percentage points with 95% confidence. (a) Find the sample size with p* = 0.5. (b) An earlier survey suggests p is about 0.85; find n again and explain why it is smaller. (c) Name one source of error that no sample size will remove.

0 words
Quick self-check

How confident are you that you can build and correctly interpret a confidence interval for a proportion, and find the sample size for a margin of error?

Not yetVery confident

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.

  1. In a random sample of 1000, 422 said yes. Construct a 90% confidence interval for the population proportion.
    Check your answer
    Answer: p̂ = 0.422; margin ≈ 0.026; interval ≈ (0.396, 0.448). We are 90% confident that the proportion of the whole population who would say yes is between 0.396 and 0.448.
    z* ≈ 1.645. Conditions: a random sample; the sample is less than 10% of the population; successes and failures (422 and 578) are both at least 10.
  2. In a random sample of 800, 223 said yes. Construct a 95% confidence interval for the population proportion.
    Check your answer
    Answer: p̂ = 0.279; margin ≈ 0.031; interval ≈ (0.248, 0.310). We are 95% confident that the proportion of the whole population who would say yes is between 0.248 and 0.310.
    z* ≈ 1.960. Conditions: a random sample; the sample is less than 10% of the population; successes and failures (223 and 577) are both at least 10.
  3. In a random sample of 200, 53 said yes. Construct a 90% confidence interval for the population proportion.
    Check your answer
    Answer: p̂ = 0.265; margin ≈ 0.051; interval ≈ (0.214, 0.316). We are 90% confident that the proportion of the whole population who would say yes is between 0.214 and 0.316.
    z* ≈ 1.645. Conditions: a random sample; the sample is less than 10% of the population; successes and failures (53 and 147) are both at least 10.
  4. In a random sample of 400, 222 said yes. Construct a 95% confidence interval for the population proportion.
    Check your answer
    Answer: p̂ = 0.555; margin ≈ 0.049; interval ≈ (0.506, 0.604). We are 95% confident that the proportion of the whole population who would say yes is between 0.506 and 0.604.
    z* ≈ 1.960. Conditions: a random sample; the sample is less than 10% of the population; successes and failures (222 and 178) are both at least 10.
  5. In a random sample of 500, 419 said yes. Construct a 95% confidence interval for the population proportion.
    Check your answer
    Answer: p̂ = 0.838; margin ≈ 0.032; interval ≈ (0.806, 0.870). We are 95% confident that the proportion of the whole population who would say yes is between 0.806 and 0.870.
    z* ≈ 1.960. Conditions: a random sample; the sample is less than 10% of the population; successes and failures (419 and 81) are both at least 10.
  6. In a random sample of 800, 548 said yes. Construct a 90% confidence interval for the population proportion.
    Check your answer
    Answer: p̂ = 0.685; margin ≈ 0.027; interval ≈ (0.658, 0.712). We are 90% confident that the proportion of the whole population who would say yes is between 0.658 and 0.712.
    z* ≈ 1.645. Conditions: a random sample; the sample is less than 10% of the population; successes and failures (548 and 252) are both at least 10.
  7. Find z* for 90%, 95% and 99% confidence.
    Check your answer
    Answer: 1.645, 1.960 and 2.576.
  8. How large a sample gives a 95% margin of error of ±4 points for a proportion, with no prior estimate?
    Check your answer
    Answer: n = (1.96/0.04)² × 0.25 = 600.25, so 601.
    Round up.

Application

Use the skill in context. Show your reasoning.

  1. A random sample of 150 days from Springfield’s 2000-2024 daily record (NOAA) contains 55 days with measurable rain. Check the conditions, construct a 95% confidence interval for the proportion of rainy days, and interpret it.
    Check your answer
    Answer: Random sample; 150 < 10% of the 9,132 days; 55 successes and 95 failures (both ≥ 10). p̂ = 0.367, SE ≈ 0.0393, interval ≈ (0.290, 0.444). We are 95% confident that between 29.0% and 44.4% of days at Springfield in 2000-2024 had measurable rain.
    In fact the population value is 0.2945: the interval captured it.
  2. Explain what ‘95% confident’ means for the Springfield interval, without using the word ‘probability’ about the parameter.
    Check your answer
    Answer: If we took many random samples of 150 days and built an interval from each in the same way, about 95% of those intervals would contain the true proportion of rainy days.
  3. Before sampling, a planner guesses that about 13% of days have at least 0.25 inch of rain. How many days are needed for a 95% margin of error of ±0.03 for that proportion? Compare with the answer using p* = 0.5.
    Check your answer
    Answer: With p* = 0.13: n = (1.96/0.03)² × 0.13 × 0.87 ≈ 482.8, so 483. With p* = 0.5: 1,068. A good prior guess far from 0.5 cuts the required sample by more than half.

Challenge

Stretch problems. Expect to think before you write.

  1. A random sample of 40 days contains 3 days with at least 1.5 inches of rain. Why is the usual z-interval not appropriate, and what could you do?
    Check your answer
    Answer: Only 3 successes (fewer than 10), so p̂ is not approximately normal and the interval would be unreliable (it would even extend below 0). Take a larger sample, or use an adjusted method such as the plus-four interval: (3 + 2)/(40 + 4) ≈ 0.114 with SE based on n = 44.

Review

Keep earlier skills sharp.

  1. X is normal with mean 100 and standard deviation 15. Find P(90 < X < 119).
    Check your answer
    Answer: 0.6449
    Standardize both ends, then subtract the cumulative areas.
  2. X ~ Binomial(n = 7, p = 0.4). Find P(X = 3), P(X ≤ 3), and the mean and standard deviation of X.
    Check your answer
    Answer: P(X = 3) ≈ 0.2903; P(X ≤ 3) ≈ 0.7102; mean 2.80; SD ≈ 1.296
    P(X = k) = C(7, k) pk(1 − p)n−k.

Missouri Learning Standards — Mathematics (data and probability) addressed: A2.DS.A.4, A2.DS.A.5, A2.DS.A.1, MP.2

Extends beyond Missouri Statistics (enrichment): content Missouri places after Statistics

Instructional focus: Construction and interpretation of confidence intervals for a proportion

Reading

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

SampleRainy days xp̂SELowerUpperCaptures 0.3117?90% interval captures?
1610.3050.03260.2410.369yesyes
2530.2650.03120.2040.326yesyes
3580.2900.03210.2270.353yesyes
4560.2800.03170.2180.342yesyes
5470.2350.03000.1760.294nono
6570.2850.03190.2220.348yesyes
7490.2450.03040.1850.305nono
8710.3550.03380.2890.421yesyes
9600.3000.03240.2360.364yesyes
10580.2900.03210.2270.353yesyes
11620.3100.03270.2460.374yesyes
12770.3850.03440.3180.452nono
13680.3400.03350.2740.406yesyes
14710.3550.03380.2890.421yesyes
15640.3200.03300.2550.385yesyes
16560.2800.03170.2180.342yesyes
17650.3250.03310.2600.390yesyes
18650.3250.03310.2600.390yesyes
19660.3300.03320.2650.395yesyes
20520.2600.03100.1990.321yesno
21540.2700.03140.2080.332yesyes
22600.3000.03240.2360.364yesyes
23700.3500.03370.2840.416yesyes
24620.3100.03270.2460.374yesyes
25700.3500.03370.2840.416yesyes
26640.3200.03300.2550.385yesyes
27540.2700.03140.2080.332yesyes
28670.3350.03340.2700.400yesyes
29680.3400.03350.2740.406yesyes
30610.3050.03260.2410.369yesyes
31610.3050.03260.2410.369yesyes
32720.3600.03390.2930.427yesyes
33670.3350.03340.2700.400yesyes
34620.3100.03270.2460.374yesyes
35500.2500.03060.1900.310nono
36620.3100.03270.2460.374yesyes
37680.3400.03350.2740.406yesyes
38600.3000.03240.2360.364yesyes
39560.2800.03170.2180.342yesyes
40620.3100.03270.2460.374yesyes

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)

Up NextComplete & Continue →

Leave a Reply Cancel reply

Performance Task — Sampling Distribution Simulation Study
Prev
Confidence Intervals for a Mean
Next

© 2026 The VR School | Career content by Wiley | Powered by Sejal Learning Systems.

Join free · Accreditation · Privacy Policy · Terms of Service

Modal title

Main Content