Topic contents

Lesson 7

Confidence interval for a population proportion

How can we estimate the proportion of university students who use generative AI tools?

Survey example and estimation settings

Try it

Confidence level

The initial data are a teaching example, not an actual survey. Simulated sampling assumes 60% of the simulated population use AI tools. With replacement (each selected unit is returned before the next draw), sampling is simulated with independent draws; without replacement, a finite population is generated first and then sampled without replacement.

Interval estimation resultsNormal approximation

Sample proportion p̂
64.00%
Critical value z
1.960
Margin of error Δ
6.65%

95% confidence interval for the population proportion[57.35%, 70.65%]

0%20%40%60%80%100%Proportion of students using AI toolsSample proportion57.35%70.65%
  • Population proportion confidence interval
  • Sample proportion
Confidence interval for the population proportion and sample proportion (horizontal axis in percent)

Current sample: students surveyed = 200, AI tool users = 128; sample proportion = 64.00%.

Adjust sample size, sample proportion, and confidence level to observe how the interval changes.

Critical values and the standard normal distribution

−4−2024z−1.9601.96095%α/2α/2
  • Central confidence level
  • Two tail regions
  • Critical points
Standard normal distribution N(0,1): central area 95%, with 2.5% in each tail

Central area 95%, with 2.5% in each tail; critical points ±1.9600. This plot shows standard normal critical values, rather than the distribution curve of the sample proportion itself.

Formula and calculation steps

p^±z1−α/2p^(1−p^)n\hat{p}\pm z_{1-\alpha/2}\sqrt{\frac{\hat{p}(1-\hat{p})}{n}}
  1. Step 1: calculate the sample proportion
    p^=128200=0.6400\hat{p}=\frac{128}{200}=0.6400
  2. Step 2: determine the confidence level and critical value: 95%, α = 0.05
    z1−α/2=1.9600z_{1-\alpha/2}=1.9600
  3. Step 3: calculate the standard error
    σp^=0.6400×0.3600200=0.03394\sigma_{\hat{p}}=\sqrt{\frac{0.6400\times 0.3600}{200}}=0.03394
  4. Step 4: calculate the margin of error
    Δ=1.9600×0.03394=0.06652\Delta=1.9600\times 0.03394=0.06652
  5. Step 5: construct the confidence interval
    p^±Δ=0.6400±0.06652\hat{p}\pm\Delta=0.6400\pm 0.06652
  6. [57.35%, 70.65%]

Sampling with replacement uses independent random draws; sampling without replacement uses simple random sampling from a finite population. Convenience sampling or voluntary response surveys may involve selection bias.

Think about it

  1. How does the standard error differ between sampling with and without replacement?
  2. Why is estimation often less precise at a sample proportion near 50%, for the same sample size?
  3. What problems can a normal-approximation interval have when the sample proportion is near 0 or 1?

The confidence level describes the interval construction method's long-run coverage under repeated sampling, rather than the probability that a particular interval already calculated contains the population proportion.

Survey example and estimation settings

n = 200 · x = 128 · 95% · Normal approximation