b. Random Sampling
Topics 3 and 4 used samples to learn about populations — that’s inference. This lecture asks: when does inference actually work?
A representative sample mirrors the population. Random sampling is the reliable way to get there: it removes systematic differences between sample and population (on average).
Convenience samples, by contrast, typically don’t: easy-to-reach individuals may differ systematically from the rest, introducing sampling bias.
Result: random sampling enables generalization; convenience sampling does not.
Two groups study adelgid presence on hemlock trees at Hope College Nature Preserve.
Group A (Convenience): walk the trails, inspect hemlocks visible from the trail.
Group B (Random): random number generator selects 50 from a list of all hemlocks.
Which group can generalize their findings to all hemlocks?
Group B. Random selection gives a sample that mirrors the population’s mix of locations, ages, and conditions. Group A only sees trail-side trees — not a representative slice of the forest.
What Group B did has a name.
Simple Random Sample (SRS): Every individual in the population has an equal and independent chance of being selected.
Implementing an SRS (Hemlock study example):
A vitamin manufacturer’s standard: if the true defect rate exceeds 4%, the batch is out of spec and shouldn’t ship.
A QC inspector takes an SRS of 50 tablets from a recent batch of ~50,000. They find 6 defective (\hat{p} = 6/50 = 0.12).
Question: Is there evidence the batch’s true defect rate exceeds 4%?
H_0: p = 0.04
H_a: p > 0.04
If H_0: p = 0.04 were true, what would \hat{p} from a random sample of 50 typically look like? Simulate 1,000 such samples.
Of 1,000 simulated samples, only 15 had \hat{p} \geq 0.12. Simulation p-value ≈ 0.015 — the probability of seeing data this extreme (or more) if H_0 were true.
Conclusion. Reject H_0 at \alpha = 0.05. There is statistically significant evidence that the batch’s true defect rate exceeds 4% (\hat{p} = 0.12, p-value \approx 0.015). The factory should investigate.
Where does this conclusion apply?
For each scenario, decide: Is this a simple random sample? To what population (if any) can findings generalize?
(a) A nutritionist surveys the first 100 students entering the dining hall at lunch about their breakfast habits. (a) Not an SRS — convenience sample (whoever shows up at lunch). Generalizes at best to lunchtime dining-hall visitors, not all students; likely sampling bias (skips students who skip lunch, eat off-campus, etc.).
(b) A forestry team numbers every tree in a 40-acre plot 1–8,420 and uses a random number generator to pick 100 trees to measure for height. (b) SRS. Sampling frame is all 8,420 trees; every tree has equal and independent chance. Generalizes to the entire 40-acre plot.
(c) A study posts a link on Reddit asking sleep-deprived adults to fill out a survey about caffeine use. (c) Not an SRS — voluntary response from self-selected Reddit users. Doesn’t generalize to “sleep-deprived adults” broadly; those who chose to respond likely differ systematically.
A botanist wants to estimate what fraction of survey patches in a nature preserve contain garlic mustard, an invasive plant.
Question: What’s a 95% CI for the true proportion of patches with garlic mustard?
Treat the 30-patch sample as a stand-in for the population (all 1,500 patches). Resample 30 patches with replacement 1,000 times — each resample gives a \hat{p}_{boot}.
95% bootstrap CI: the 2.5th and 97.5th percentiles → (0.13, 0.43).
Conclusion. \hat{p} \approx 0.27, 95% CI [0.13, 0.43]. We are 95% confident the true proportion of patches with garlic mustard is between roughly 13% and 43%.
Where does this conclusion apply?
A representative sample mirrors the population. SRS gets us there.
Why not convenience sampling?
SRS sidesteps both by giving every individual equal chance — no subgroup systematically favored. That’s how we get from sample to population.