Repeated sampling and interval variation
Specify independent trials, separate n from R, and distinguish fixed population truth from varying samples and intervals
- Choose the experiment Specify a fixed population success probability p, n independent trials per sample and R repeated samples. Decide which outcomes count as success before drawing
- Start a fresh sample count For each repetition r = 1,…,R, set X = 0. Keep the same p and n while comparing repeated samples
- Generate each trial Draw U uniformly from [0,1). If U < p, add 1 to X. Repeat this step n times using fresh independent draws
- Record and repeat Store X/n as one sample proportion, then return to X = 0 for the next sample. Do not carry successes into the next sample
- Summarise the repetitions Inspect the distribution of the R proportions. When comparing sample sizes, keep p fixed; when comparing probabilities, keep n fixed
- Form each interval from its own sample Use that sample’s observed proportion and n. The usual normal interval below is approximate and requires an appropriate independent random sample and sufficiently large success/failure counts \(\displaystyle \widehat p\pm1.96\sqrt{\frac{\widehat p(1-\widehat p)}{n}}\)
- Check coverage only when p is known In a simulation the chosen p is known, so count an interval if lower ≤ p ≤ upper. In a real inference problem p is unknown, so the realised interval’s coverage cannot usually be observed
- Keep confidence and observed coverage separate A nominal 95% procedure is intended to cover the fixed p in about 95% of repetitions under its approximation conditions. A finite run need not give exactly 95% and the procedure need not have exact nominal coverage
Worked example
Trace two independent five-trial samples with p = 0.6 using the ten supplied uniform draws
- \(\displaystyle X_1=3,\quad\widehat p_1=3/5\)Count the first group below 0.6
- \(\displaystyle X_2=4,\quad\widehat p_2=4/5\)Reset the count and use the next group
- \(\displaystyle \overline{\widehat p}=\frac{3/5+4/5}{2}=7/10\ne3/5\)Average the two stored proportions; the finite mean need not equal p.
Common mistakes
Difficulty levels
Questions about this topic
Why is the simulation centre only near p?+
A simulation contains a finite number of random samples, so its observed centre can differ from p even though repeated sampling is centred on p.
How does sample size affect variation?+
For a fixed population proportion, the variance p(1-p)/n becomes smaller as n increases, so sample proportions are less variable
Why can confidence intervals from different samples have different endpoints?+
Each sample can have a different sample proportion, and the interval is formed around that sample proportion with its own estimated margin
Does this lesson assess execution in an external calculator or spreadsheet?+
It checks algorithm tracing and interpretation. You can implement the stated procedure in your technology, but these checked entries do not prove that you independently ran it
Can I enter a percentage for a proportion?+
These scalar and generated proportion entries request a fraction or decimal. For example, enter 0.35 or 7/20 for 35%
Can I use a calculator?+
No. This topic is practised without a calculator
Which year level and chapter is this?+
Year 12, VCE Units 3 & 4, Mathematical Methods, chapter 14: Statistical inference