Module 04 Activity
Scenario
Quantify how much you actually know, using simulation where the formula is unclear.
What you build
A numpy simulation study and a set of intervals whose interpretation you can defend.
Steps
- Build a population, draw repeated samples, and look at the spread of the estimates. Confirm no single sample was wrong.
- Repeat at three sample sizes and check the spread falls with the square root of n.
- Compute the standard error from one sample with
ddof=1and compare it with the simulated spread of many. - Bootstrap a statistic with no simple formula, resampling with
replace=Trueat the original size, at least a few thousand times. - Build intervals for a mean and for a proportion, using Wilson for the proportion, and tabulate width against n.
- Write the interpretation of one interval in a sentence that would survive review, and list two wordings you rejected.
Evidence to hand in
- The sampling-variation simulation.
- The spread at three sample sizes against the square-root prediction.
- The standard error computed both ways, with the gap explained.
- The bootstrap distribution and its percentile interval.
- The width-against-n table.
- Your interpretation sentence and the rejected wordings.
Review checklist
- Every random step uses a seeded
default_rng. ddof=1is used for every sample standard deviation.- The bootstrap resamples with replacement at the original sample size.
- Proportion intervals use Wilson rather than the normal approximation.
- The interpretation does not attribute probability to a computed interval.
