# Sampling Plan: [Your study population and question]

> A working sampling plan for your own survey, study or quality check: it defines the target population, the
> sampling frame and the unit, chooses a probability or non-probability design, lists the bias risks, and sizes the
> sample with a margin-of-error calculation, with seeded R and Python code that draws a stratified sample. It is for
> methods students, thesis writers planning data collection and analysts who must defend how their data were
> chosen. It speeds up learning by making you answer the same five questions in the same order for every study, so
> the logic of "who could have been in my data" becomes automatic. The worked examples use fictional data; replace
> them with your own. Source basis: classic survey sampling texts (Cochran 1977, Kish 1965, Lohr 2021) and the
> NIST/SEMATECH e-Handbook, written in original words.

<!--
Guidance: How to use this template
- Work top to bottom: population, frame, unit, design, bias risks, sample size, then the plan table at the end.
- Write the target population before you look at what list is available. The gap between the two is your coverage risk.
- Read worked example A, fill the gaps in example B, then do exercise C before checking the answer key.
- Use the seeded code to draw your real sample and keep the seed, the script and the drawn list in your project files.
- For sample size beyond a single proportion (means, group comparisons, regression), use academic/stats-power-sample-size.
- Related templates: academic/stats-power-sample-size, academic/stats-variable-codebook, academic/stats-data-cleaning-log, academic/stats-confidence-intervals, academic/stats-sampling-distributions, academic/stats-experiment-design, academic/stats-analysis-plan, science/observational-study, science/preregistration
-->

## Document control

<!-- Guidance: Record the version of the plan that was actually used to draw the sample. If you change the plan after drawing, add a revision row and explain why. -->

| Field | Value |
|---|---|
| Course or project | [Course code and title, or study name] |
| Learner or analyst | [Your name] |
| Data set | [Sampling frame file name and date, e.g. residence_list_2026-02-01.csv] |
| Software and versions | R 4.5.1 (base and stats); Python 3.14 with numpy 2.5.4, pandas 3.1.0, scipy 1.18.1 |
| Date | YYYY-MM-DD |
| Version | [0.1] |

## What a sampling plan decides

<!-- Guidance: Read this once to see the chain of decisions. Each later section fills one link of the chain. -->

Almost every statistical method assumes that the data are a random sample from some population. A sampling plan is
where you make that assumption true, or at least honest. It answers five questions:

1. **Who or what do I want to describe?** (target population)
2. **Which list or procedure can I actually draw from?** (sampling frame)
3. **What is one "case"?** (sampling unit and observation unit)
4. **How are cases chosen?** (design: probability or not, and which one)
5. **How many do I need, and how many will I invite?** (sample size and expected response)

The diagram shows where each kind of error enters. Each step loses or distorts part of the population, and only one
of these errors (sampling error) is measured by a standard error or a confidence interval. The others must be
handled by design and described in your limitations.

```mermaid
flowchart TD
  P["Target population: who you want to describe"] -->|"coverage error: people missing from the list"| F["Sampling frame: the list you draw from"]
  F -->|"sampling error: chance in who is drawn"| S["Selected sample"]
  S -->|"nonresponse error: who does not answer"| R["Respondents"]
  R -->|"measurement error: wrong or biased answers"| D["Data you analyse"]
```

| Use this template when | Not the right tool when |
|---|---|
| You will survey or measure a subset of a defined group | You will measure every unit (a census): then document coverage and nonresponse only |
| You must justify representativeness to a supervisor, examiner or client | You randomise units to treatments in an experiment (use academic/stats-experiment-design for allocation) |
| You plan a quality-control inspection of items from production | The question is purely about power for a hypothesis test (use academic/stats-power-sample-size) |

## Population, frame and unit

<!-- Guidance: Define each term for your study in one sentence. Then list who is in the population but not in the frame (undercoverage) and who is in the frame but not in the population (overcoverage). -->

| Term | Plain meaning | Lakemoor example | My study |
|---|---|---|---|
| Target population | The whole group your conclusions are about | All students enrolled at Lakemoor University in spring term | [ ] |
| Study population | The part of it you can realistically reach | Students enrolled on the census date with a university email | [ ] |
| Sampling frame | The actual list or procedure used to draw the sample | Registry export of 4,000 enrolled students with faculty and email | [ ] |
| Sampling unit | What is drawn from the frame | One student (or, in a cluster design, one seminar group) | [ ] |
| Observation unit | What is measured | One student's questionnaire | [ ] |
| Undercoverage | In population, missing from frame | Students who enrolled after the census date | [ ] |
| Overcoverage | In frame, not in population | Students who withdrew but are still listed | [ ] |

A frame is good when every member of the target population appears exactly once and you have the information
needed to stratify or contact them. Duplicates (one person listed twice) give that person a double chance of
selection; missing groups get zero chance, and no sample size can fix a zero.

## Probability sampling designs

<!-- Guidance: Choose one design and write down why. A probability design means every unit in the frame has a known, non-zero chance of selection; that known chance is what allows standard errors and weights. -->

In a **probability sample**, every unit in the frame has a known, non-zero chance of being selected, and chance
alone (a seeded random number generator, not the researcher) makes the selection. That known chance is what lets
you compute standard errors, confidence intervals and design weights.

| Design | How it works | When it fits | Strength | Limit |
|---|---|---|---|---|
| Simple random sampling (SRS) | Every possible sample of size n is equally likely | Complete list, fairly homogeneous population | Simplest analysis; the textbook formulas assume it | Small subgroups may get very few cases by chance |
| Systematic | Random start between 1 and k, then every k-th unit, with $k = N/n$ | Ordered lists, production lines, queues | Easy in the field; spreads the sample over the list | Bias if the list has a cycle that matches k (periodicity) |
| Stratified | Split the frame into groups (strata), take a random sample in each | Known subgroups that differ on the outcome, or that you must report separately | More precise than SRS when strata differ; guarantees each group is present | Needs the stratum variable in the frame; unequal allocation needs weights |
| Cluster | Randomly select whole groups (classes, branches, days), measure everyone in them | No list of individuals but a list of groups exists; travel costs matter | Cheap and practical | Less precise than SRS of the same n because people in a cluster are alike (design effect) |
| Multistage | Sample clusters, then sample units inside the chosen clusters, possibly in more stages | Large or national surveys | Balances cost and precision | Complex weights and variance estimation; needs survey software |

Two technical terms appear in every design. The **inclusion probability** $\pi_i$ is the chance that unit $i$ is
selected. The **design weight** is its inverse, $w_i = 1/\pi_i$: the number of population units each sampled unit
"stands for". In SRS all weights are equal, so they can be ignored for means and proportions. In a stratified design
with **proportional allocation** (each stratum sampled at the same fraction), weights are also equal. With
**disproportionate allocation** (for example, oversampling a small faculty so it can be analysed on its own), the
weights differ and must be used for whole-population estimates. Neyman (1934) showed that, for a fixed total n, the
most precise allocation samples more heavily from strata that are larger and more variable.

For cluster designs, the precision loss is summarised by the **design effect**. With clusters of average size $m$
and intraclass correlation $\rho$ (how alike people in the same cluster are):

$$\text{deff} \approx 1 + (m - 1)\rho$$

If $m = 21$ students per seminar group and $\rho = 0.05$, then deff $= 1 + 20 \times 0.05 = 2$: a cluster sample of
400 students carries about as much information as a simple random sample of 200.

## Non-probability designs and their limits

<!-- Guidance: If you must use a non-probability design, say so plainly in the plan, state which groups are likely missing, and avoid language such as "representative" or a margin of error in the report. -->

Non-probability samples are chosen by convenience, judgement or self-selection. They are fast and sometimes the only
option (pilot studies, hard-to-reach groups, early product research), but the inclusion probabilities are unknown,
so the usual standard errors describe only chance variation within an unknown selection process.

| Design | How it works | Legitimate use | Main limit |
|---|---|---|---|
| Convenience | Whoever is easy to reach (a lecture class, a shopping street) | Pilot testing of a questionnaire | The sample mirrors the access route, not the population |
| Voluntary response (self-selected) | People opt in, for example an online poll link | Gathering opinions, not estimating prevalence | People with strong views or free time are over-represented |
| Quota | Fill set numbers per group (e.g. 50% women), by any method within groups | Fast market research matched on a few variables | Matches the quota variables only; selection inside groups is uncontrolled |
| Purposive (judgement) | Researcher picks typical or extreme cases | Qualitative studies, expert panels | Generalisation rests on the researcher's judgement |
| Snowball (respondent-driven) | Participants recruit further participants | Hidden or hard-to-reach populations | Networks over-represent connected people; independence fails |

The honest rule for reporting a non-probability sample: describe who took part, compare their profile with known
population figures where possible, and present uncertainty statements with an explicit caveat. A large
non-probability sample can be precisely wrong: more cases shrink the standard error but do not remove selection bias.

## Choosing a design

<!-- Guidance: Walk through the flow with your own study. Write the path you took in the plan table at the end. -->

Start at the top and answer each question about your frame. The first question is the most important: without a
complete list of units, simple random, systematic and stratified designs are not possible, and the choice is between
sampling groups (clusters) and a non-probability design with stated limits. When several designs are possible,
prefer the one that guarantees the subgroups you must report and keeps the analysis as simple as the question allows.

```mermaid
flowchart TD
  A["Is there a complete list of units?"] -->|Yes| B["Do known subgroups differ, or must each be reported?"]
  A -->|No| C["Is there a list of groups such as classes, branches or days?"]
  B -->|Yes| D["Stratified random sample"]
  B -->|No| E["Is the list ordered with no cycle?"]
  E -->|Yes| F["Systematic sample with random start"]
  E -->|No| G["Simple random sample"]
  C -->|Yes| H["Cluster or multistage sample"]
  C -->|No| I["Non-probability design: state the limits"]
```

## Bias sources to plan against

<!-- Guidance: For each bias, write one concrete risk in your study and one design action that reduces it. A bias without an action is a limitation you must report. -->

**Bias** is a systematic difference between what the sample tells you and the population truth. It does not shrink
when the sample grows, which is why it matters more than random error in large studies.

| Bias | What happens | Lakemoor or Harbour City example | Design action |
|---|---|---|---|
| Selection bias | The way units enter the sample is related to the outcome | Surveying library use by approaching students inside the library | Use a probability design from a complete frame |
| Coverage bias | Part of the population is missing from the frame | Using a residence-hall list to study all students misses commuters | Choose a better frame or combine frames; report the excluded group |
| Nonresponse bias | People who answer differ from those who do not | Stressed students are less likely to complete a stress survey | Reminders, short questionnaire, compare respondents with frame data, weighting |
| Measurement bias | Answers are systematically wrong | Students over-report study hours to a lecturer | Anonymous collection, neutral wording, validated scales |
| Survivorship bias | Only units that "survived" a process are observed | Studying graduates' study habits ignores those who dropped out | Sample before the filtering event, or include the lost cases |

Survivorship bias has a classic story: in the Second World War, the statistician Abraham Wald pointed out that the
bullet holes on returning aircraft showed where planes could be hit and still return, so armour belonged where the
returning planes had *no* holes. The planes that did not return were the missing data.

**Response rate.** Plan for it. If you expect 40% of invited students to respond and need 351 completes, invite
$351 / 0.40 \approx 878$. A higher invitation number does not cure nonresponse bias; it only protects the sample size.

## Sample size and margin of error for a proportion

<!-- Guidance: Use this section when your main estimate is a percentage. For means, comparisons between groups or regression, size the study with academic/stats-power-sample-size and copy the result into the plan table. -->

**Plain language first.** The margin of error (MOE) is half the width of a 95% confidence interval. It says how far
the sample percentage is likely to be from the population percentage because of chance alone, assuming a
probability sample and no other bias. It shrinks with the square root of the sample size n: to halve the MOE you need
about four times as many cases. When the sample is a large share of a finite population (more than about 5%), a
**finite population correction** (FPC) makes the MOE smaller, because you have already seen much of the population.

**Formula.** For a proportion $p$ estimated from a simple random sample of size $n$ from a population of size $N$:

$$\text{MOE} = z_{1-\alpha/2}\sqrt{\frac{p(1-p)}{n}}\;\sqrt{\frac{N-n}{N-1}}$$

To plan the sample size for a target margin $e$, first ignore the population size, then correct:

$$n_0 = \frac{z_{1-\alpha/2}^{2}\,p(1-p)}{e^{2}}, \qquad n = \frac{n_0}{1 + \dfrac{n_0 - 1}{N}}$$

| Symbol | Meaning |
|---|---|
| $p$ | Expected proportion; use 0.5 when unknown, because $p(1-p)$ is largest there (the safe choice) |
| $e$ | Target margin of error, as a proportion (0.05 = 5 percentage points) |
| $z_{1-\alpha/2}$ | Normal quantile; 1.96 for 95% confidence |
| $N$ | Population (frame) size |
| $n_0$ | Sample size for an infinite population |
| $n$ | Sample size after the finite population correction; round up |
| deff | Design effect; multiply $n$ by it for cluster designs |

The full planning chain is: $n_0$, then FPC, then multiply by the design effect, then divide by the expected response
rate. For hypothesis tests and comparisons between groups, the question is power rather than margin of error: see
academic/stats-power-sample-size.

The chart shows how the MOE for $p = 0.5$ falls as the sample grows from a population of 4,000, with and without the
FPC. The curves are close for small samples and separate once n is a large fraction of N.

```vega-lite
{
  "$schema": "https://vega.github.io/schema/vega-lite/v5.json",
  "description": "Margin of error for p = 0.5 at 95% confidence, N = 4000, with and without finite population correction.",
  "width": 380,
  "height": 220,
  "data": {"values": [
    {"n": 50, "moe": 0.1386, "formula": "no FPC"}, {"n": 50, "moe": 0.1377, "formula": "with FPC"},
    {"n": 100, "moe": 0.0980, "formula": "no FPC"}, {"n": 100, "moe": 0.0968, "formula": "with FPC"},
    {"n": 200, "moe": 0.0693, "formula": "no FPC"}, {"n": 200, "moe": 0.0675, "formula": "with FPC"},
    {"n": 400, "moe": 0.0490, "formula": "no FPC"}, {"n": 400, "moe": 0.0465, "formula": "with FPC"},
    {"n": 800, "moe": 0.0346, "formula": "no FPC"}, {"n": 800, "moe": 0.0310, "formula": "with FPC"},
    {"n": 1600, "moe": 0.0245, "formula": "no FPC"}, {"n": 1600, "moe": 0.0190, "formula": "with FPC"},
    {"n": 3200, "moe": 0.0173, "formula": "no FPC"}, {"n": 3200, "moe": 0.0077, "formula": "with FPC"}
  ]},
  "mark": {"type": "line", "point": true},
  "encoding": {
    "x": {"field": "n", "type": "quantitative", "title": "Sample size n"},
    "y": {"field": "moe", "type": "quantitative", "title": "Margin of error", "axis": {"format": ".0%"}},
    "color": {"field": "formula", "type": "nominal", "title": null}
  }
}
```

## Worked example A: a stratified sample of Lakemoor students

<!-- Guidance: Read the code and output line by line. Then change the seed and run it again: the selected IDs change, the allocation does not. That is what "random but reproducible" means. -->

**Setting.** The Lakemoor University (fictional) student union wants to pilot a library-use questionnaire with 40
students from a frame of 400 students living in the two residence halls. The frame lists each student's faculty:
ARTS 120, SCI 160, BUS 80, ENG 40. Faculties are expected to use the library differently, and the union wants every
faculty present, so a stratified design with proportional allocation is chosen.

**Step 1: allocation by hand.** The sampling fraction is $40/400 = 0.10$. Proportional allocation gives each stratum
10% of its size: ARTS $120 \times 0.10 = 12$, SCI 16, BUS 8, ENG 4. Total 40. Each sampled student represents
$1/0.10 = 10$ students, so every design weight is 10.

**Step 2: draw the sample with a seed.** A seed makes the random draw reproducible: anyone running the script gets
the same students. Record the seed in the plan before drawing, so nobody can re-draw until a "nicer" sample appears.

```r
# Sampling frame: 400 Lakemoor University students (fictional)
frame <- data.frame(
  student_id = sprintf("LU%03d", 1:400),
  faculty    = rep(c("ARTS", "SCI", "BUS", "ENG"), times = c(120, 160, 80, 40))
)
n_total <- 40
N_h <- table(frame$faculty)
n_h <- round(n_total * N_h / sum(N_h))     # proportional allocation
print(n_h)
set.seed(2026)
idx <- unlist(lapply(names(n_h), function(h) {
  rows <- which(frame$faculty == h)
  rows[sample.int(length(rows), n_h[[h]])]
}))
smp <- frame[idx, ]
smp$weight <- as.numeric(N_h[smp$faculty] / n_h[smp$faculty])
print(table(smp$faculty))
print(head(smp[smp$faculty == "ENG", ], 4), row.names = FALSE)
# Sample size for a proportion, margin 0.05, with finite population correction
z <- qnorm(0.975); p <- 0.5; e <- 0.05; N <- 4000
n0 <- z^2 * p * (1 - p) / e^2
n_fpc <- n0 / (1 + (n0 - 1) / N)
cat(sprintf("n0 = %.1f, n with FPC = %.1f -> %d\n", n0, n_fpc, ceiling(n_fpc)))
moe <- function(n, N, p = 0.5) z * sqrt(p * (1 - p) / n) * sqrt((N - n) / (N - 1))
cat(sprintf("MOE at n = 200: %.4f (no FPC %.4f)\n", moe(200, N), z * sqrt(0.25 / 200)))
```

```text
ARTS  BUS  ENG  SCI 
  12    8    4   16 

ARTS  BUS  ENG  SCI 
  12    8    4   16 
 student_id faculty weight
      LU397     ENG     10
      LU395     ENG     10
      LU372     ENG     10
      LU363     ENG     10
n0 = 384.1, n with FPC = 350.6 -> 351
MOE at n = 200: 0.0675 (no FPC 0.0693)
```

```python
import numpy as np, pandas as pd
from scipy import stats
frame = pd.DataFrame({
    "student_id": [f"LU{i:03d}" for i in range(1, 401)],
    "faculty": np.repeat(["ARTS", "SCI", "BUS", "ENG"], [120, 160, 80, 40]),
})
n_total = 40
N_h = frame["faculty"].value_counts().sort_index()
n_h = (n_total * N_h / N_h.sum()).round().astype(int)
print(n_h.to_dict())
rng = np.random.default_rng(2026)
parts = [g.sample(n=n_h[h], random_state=rng) for h, g in frame.groupby("faculty")]
smp = pd.concat(parts)
smp["weight"] = smp["faculty"].map(N_h / n_h)
print(smp["faculty"].value_counts().sort_index().to_dict())
print(smp[smp["faculty"] == "ENG"].head(4).to_string(index=False))
z = stats.norm.ppf(0.975); p = 0.5; e = 0.05; N = 4000
n0 = z**2 * p * (1 - p) / e**2
n_fpc = n0 / (1 + (n0 - 1) / N)
print(f"n0 = {n0:.1f}, n with FPC = {n_fpc:.1f} -> {int(np.ceil(n_fpc))}")
moe = lambda n: z * np.sqrt(p * (1 - p) / n) * np.sqrt((N - n) / (N - 1))
print(f"MOE at n = 200: {moe(200):.4f} (no FPC {z*np.sqrt(0.25/200):.4f})")
```

```text
{'ARTS': 12, 'BUS': 8, 'ENG': 4, 'SCI': 16}
{'ARTS': 12, 'BUS': 8, 'ENG': 4, 'SCI': 16}
student_id faculty  weight
     LU394     ENG    10.0
     LU382     ENG    10.0
     LU369     ENG    10.0
     LU366     ENG    10.0
n0 = 384.1, n with FPC = 350.6 -> 351
MOE at n = 200: 0.0675 (no FPC 0.0693)
```

**Step 3: read the output.** Both languages allocate 12, 8, 4 and 16 students and give every student a weight of 10.
The selected IDs differ (R picks LU397, LU395, LU372, LU363 among engineers; Python picks LU394, LU382, LU369,
LU366). That is not an error: R and numpy use different random number generators, so the same seed number gives
different streams. The design is the same; the draw is reproducible only within one language and version. Record
the language, version and seed in the plan.

**Step 4: size the main survey by hand.** For the full survey of all 4,000 students, the union wants a 95% MOE of
5 percentage points with $p$ unknown, so $p = 0.5$:

$n_0 = 1.96^2 \times 0.25 / 0.05^2 = 3.8415 \times 0.25 / 0.0025 = 384.1$.

FPC: $n = 384.1 / (1 + 383.1/4000) = 384.1 / 1.0958 = 350.6$, rounded up to 351 completed questionnaires. With an
expected response rate of 40%, invite $351 / 0.40 \approx 878$ students.

The second output line shows the gain from the FPC at $n = 200$: the MOE is 6.75 points instead of 6.93 points.
At this sampling fraction (5%) the correction is small; it matters more for small populations such as one
residence hall or one bakery's daily output.

**Interpretation and report sentence.** "A stratified random sample of 40 students (proportional allocation by
faculty, seed 2026, R 4.5.1) was drawn from the residence-hall list of 400 students; all design weights equal 10.
The main survey requires 351 completed responses for a 95% margin of error of ±5 percentage points (N = 4,000,
finite population correction applied), and 878 invitations at an expected 40% response rate."

## Worked example B: Brightwell Bakery loaf inspection (half solved)

<!-- Guidance: Complete each [ ] gap and write one sentence of reasoning for it. Then check the answer key. -->

**Setting.** Brightwell Bakery (fictional) bakes 2,400 loaves per day on one line. Quality control will weigh 60
loaves per day. The loaves come off the line in trays of 8, and position 1 of every tray sits nearest the oven door,
where loaves bake slightly lighter.

| Decision | Answer |
|---|---|
| Target population | All loaves baked that day |
| Frame | The production sequence 1 to 2,400 |
| Sampling unit | [ ] |
| Systematic interval $k = N/n$ | $2400 / 60 =$ [ ] |
| Random start | A random integer between 1 and [ ] |
| Periodicity risk | The tray cycle is 8. Is $k$ a multiple of 8? [ ] If so, every sampled loaf sits in the same tray position, and the sample is [ ] |
| Fix | [Suggest a design that avoids the problem] |
| FPC for a mean: $\sqrt{(N - n)/(N - 1)}$ | $\sqrt{2340/2399} =$ [ ] (round to 3 decimals) |

## Exercise C: Harbour City Library user survey

<!-- Guidance: Do the calculation on paper first, then check it with the code from example A by changing e, N and the response rate. -->

Harbour City Library (fictional) wants to estimate the percentage of its 12,000 registered card holders who would use
an evening opening, with a 95% margin of error of ±4 percentage points. Nothing is known about the likely percentage.
Past surveys had a 40% response rate. The frame is the card-holder database.

Tasks: (a) compute $n_0$ and the FPC-corrected $n$; (b) how many card holders should be invited? (c) name one group
in the target population "people who might use an evening opening" that is not in the frame, and the type of bias it
causes; (d) if the library instead hands questionnaires to visitors at the desk during the day, name the design and
its main bias.

## Plan table to fill in

<!-- Guidance: This table is the deliverable. Fill every row; write "not applicable" with a reason rather than leaving a row blank. Freeze it (version 1.0) before drawing the sample. -->

| Item | My plan |
|---|---|
| Research question and main estimate | [e.g. percentage of students using the library weekly] |
| Target population | [ ] |
| Sampling frame (source, date, size N) | [ ] |
| Known undercoverage and overcoverage | [ ] |
| Sampling unit and observation unit | [ ] |
| Design and reason (path through the decision flow) | [ ] |
| Strata or clusters, with sizes | [ ] |
| Allocation (proportional, equal, Neyman) and resulting weights | [ ] |
| Target precision (MOE or power) | [e.g. ±5 points at 95%; or see academic/stats-power-sample-size] |
| Sample size: $n_0$, FPC, design effect, final n | [ ] |
| Expected response rate and invitations | [ ] |
| Random procedure (software, version, seed) | [ ] |
| Main bias risks and actions (from the bias table) | [ ] |
| Nonresponse follow-up (reminders, comparison with frame) | [ ] |
| Ethics and data protection (consent, contact data handling) | [ ] |
| *Example:* Design and reason | Stratified by faculty with proportional allocation: complete registry list, faculties expected to differ, each faculty must be reported |

## Common mistakes and misconceptions

<!-- Guidance: Check your plan against each line. Copy any mistake you made into your error log with the corrected version. -->

| Mistake or misconception | Why it is wrong | Correct statement |
|---|---|---|
| "A big sample is representative." | Size reduces random error only; a biased selection stays biased at any n. | Representativeness comes from the selection process (probability design, good frame), not from n. |
| "The sample must be 10% of the population." | Precision depends mainly on n, not on the fraction; 400 people give similar precision from 4,000 or 4 million. | Size from the MOE or power formula; the FPC adjusts for large fractions. |
| Reporting a margin of error for a convenience or opt-in sample | The formula assumes known inclusion probabilities. | Describe the sample, compare with population figures, and caveat any uncertainty statement. |
| Ignoring weights after disproportionate stratification | Oversampled strata pull the overall estimate toward themselves. | Use design weights $w_i = 1/\pi_i$ for population estimates. |
| Analysing a cluster sample as if it were SRS | People in a cluster are alike; standard errors come out too small. | Account for clustering (design effect, cluster-robust or survey methods, or mixed models). |
| Re-drawing until the sample "looks right" | Turns a random sample into a judgement sample. | Fix and record the seed before drawing; draw once. |
| Treating the respondents as the sample | Nonresponse can be selective. | Report the response rate and compare respondents with the frame. |
| Using $p = 0.2$ "because it gives a smaller n" without evidence | Under-sizes the study if the true p is near 0.5. | Use 0.5 unless prior data justify another value. |

## Self-test questions

<!-- Guidance: Answer from memory, then check. Interleave: question 6 mixes this topic with confidence intervals on purpose. -->

1. What is the difference between the target population and the sampling frame? Give a Lakemoor example of a gap.
2. Why does a stratified sample with proportional allocation not need weights for a whole-population proportion,
   while an equal allocation of 10 per faculty (ARTS 120, SCI 160, BUS 80, ENG 40) does? Give the four weights.
3. A cluster sample uses seminar groups of 26 students with $\rho = 0.04$. What is the design effect, and what
   effective sample size do 520 students give?
4. Halving the margin of error requires multiplying the sample size by about how much? Why?
5. Name the bias: a study of successful bakeries' habits based only on bakeries still open after five years.
6. A probability survey of n = 351 reports 42% weekly library use with a 95% MOE of ±5 points. A student says,
   "there is a 95% chance the true value is between 37% and 47%." What is the more accurate statement?

## My notes and next steps

<!-- Guidance: Rate yourself honestly and set a review date; spaced review a week and a month later is what moves this from recognition to recall. -->

| Item | My entry |
|---|---|
| Confidence with frames and coverage (1 to 5) | [ ] |
| Confidence choosing a design (1 to 5) | [ ] |
| Confidence with the MOE and FPC formulas (1 to 5) | [ ] |
| Questions still open | [ ] |
| Mistakes to copy into my error log (academic/stats-error-log) | [ ] |
| Next step | [Size comparisons with academic/stats-power-sample-size, then build the codebook] |
| Review again on | YYYY-MM-DD |

## Sources and further reading

<!-- Guidance: Cite what you used for your plan. Survey sampling textbooks give the variance formulas for stratified and cluster designs if you need them. -->

Based on standard survey sampling theory as presented in the texts below, written in original words; the margin of
error and finite population correction formulas are standard results.

- Cochran, W. G. (1977). *Sampling Techniques* (3rd ed.). Wiley.
- Kish, L. (1965). *Survey Sampling*. Wiley (design effect).
- Lohr, S. L. (2021). *Sampling: Design and Analysis* (3rd ed.). CRC Press.
- Neyman, J. (1934). On the two different aspects of the representative method: the method of stratified sampling and the method of purposive selection. *Journal of the Royal Statistical Society*, 97(4), 558–625 (with discussion; optimal allocation).
- Horvitz, D. G., and Thompson, D. J. (1952). A generalization of sampling without replacement from a finite universe. *Journal of the American Statistical Association*, 47(260), 663–685 (inverse-probability weights).
- Groves, R. M., Fowler, F. J., Couper, M. P., Lepkowski, J. M., Singer, E., and Tourangeau, R. (2009). *Survey
  Methodology* (2nd ed.). Wiley (total survey error).
- NIST/SEMATECH e-Handbook of Statistical Methods, sections 7.2.2.2 and 7.2.4.2 Sample sizes required, https://www.itl.nist.gov/div898/handbook/ (accessed 2026-10-25). Public domain.
- Further reading: de Smith, M. J., *Statistical Analysis Handbook* (2024 edition, statsref.com); Diez, Çetinkaya-Rundel
  and Barr, *OpenIntro Statistics* (chapter on sampling principles).

## Answer key

<!-- Guidance: Check only after answering. If your reasoning differed even where the number matched, write the difference down. -->

**Worked example B.**
Sampling unit: one loaf. $k = 2400/60 = 40$. Random start between 1 and 40. Yes, 40 is a multiple of 8 ($40 = 5
\times 8$), so every sampled loaf has the same tray position and the sample is biased (all light, if the start
falls on position 1, or never including the light position otherwise). Fix: a simple random sample of 60 positions,
a stratified sample with tray position as strata, or an interval that is not a multiple of 8 (for example $k = 39$
with a check that it covers the day). FPC: $\sqrt{2340/2399} = \sqrt{0.97541} = 0.988$.

**Exercise C.**
(a) $n_0 = 1.96^2 \times 0.25 / 0.04^2 = 600.2$; $n = 600.2 / (1 + 599.2/12000) = 571.7$, round up to 572.
(b) $572 / 0.40 = 1430$ invitations. (c) People who do not hold a card (for example residents who stopped visiting
because of the current hours): coverage bias, likely missing exactly those who want evening hours. (d) A convenience
sample of daytime visitors: selection bias, because people who can visit in the day are less likely to need evening
hours; a margin of error would not be meaningful.

**Self-test.**
1. The target population is who you want to describe; the frame is the list you draw from. Example: target = all
   enrolled students; frame = residence-hall list, which misses commuters (undercoverage).
2. With proportional allocation every student has the same inclusion probability (0.10), so all weights are equal
   and cancel. With 10 per faculty, inclusion probabilities differ, giving weights ARTS 12, SCI 16, BUS 8, ENG 4.
3. deff $= 1 + (26 - 1) \times 0.04 = 2.0$; effective sample size $520 / 2.0 = 260$.
4. About four times, because the MOE is proportional to $1/\sqrt{n}$, and $1/\sqrt{4n} = \tfrac{1}{2} \cdot
   1/\sqrt{n}$.
5. Survivorship bias.
6. "The procedure used produces intervals that contain the true value in about 95% of repeated samples; this interval
   is 37% to 47%." The 95% describes the method, not a probability for this one interval, and it covers sampling
   error only, not nonresponse or coverage bias (see academic/stats-confidence-intervals).

## Revision history

<!-- Guidance: Any change after the sample was drawn must be recorded here with the reason, because it affects how the results can be interpreted. -->

| Version | Date | Author | Change summary |
|---|---|---|---|
| 0.1 | YYYY-MM-DD | [Your name] | First draft |
| 0.2 | YYYY-MM-DD | [Your name] | *Example:* Switched from convenience to stratified design after supervisor review |
| 1.0 | YYYY-MM-DD | [Your name] | Frozen before drawing the sample (seed recorded) |
