Reconcile a branch sampling frame, quantify simple-random-sample uncertainty and show how nonresponse affects a pass-rate decision.
Project: audit branch compliance with a finite sample and missing replies
Freeze the frame and draw
A national operations team must estimate the share of active branches meeting a document-retention rule. Pin the register date, exclude closed locations using a written rule and draw distinct branch IDs with a recorded random seed. A branch is the selection unit. If the draw is stratified or regional teams choose branches by judgment, do not label it a simple random sample. Preserve the frame, selection file and visit protocol. The sampling-frame lesson ties the denominator to the claim.
Reconcile measurement and response
Mark each selected branch as answered, refused, unreachable or ineligible; track why the classification changed. Among answered branches, record the binary compliance outcome and inspection date. A repeated inspection does not create a newly selected branch. Compute respondent summaries, but keep missing branch outcomes unresolved. The bounds lesson supplies a no-assumption selected-sample range and points to useful follow-up interviews.
Calculate design uncertainty conditionally
For a complete simple random sample without replacement, use the finite-frame variance for an estimated mean, with frame size N and selected size n. If outcomes are missing, that complete-data formula cannot simply be applied to respondents as though response were another equal-probability draw. Document any response model, weighting and sensitivity interval separately. The finite-frame lesson states the formula and its limit; design variance covers more complex draws.
Release a qualified decision
Report the fixed frame, selected and answered counts, response pattern by known branch traits, observed rate, logical selected-sample bounds, sampling uncertainty under a stated design and the operational pass threshold. The gate below holds release when branch identities, response status or the design are unresolved. Passing it sends the packet to review; it does not authorize a precise population interval when missingness assumptions are unsupported.
Implementation
def branch_audit_gate(packet):
if not packet["frame_reconciled"]:
return "hold:frame"
if not packet["selection_design_recorded"]:
return "hold:draw"
if not packet["response_status_complete"]:
return "hold:response-ledger"
if packet["missing_outcomes"] and not packet["bounds_reported"]:
return "hold:missingness-range"
return "review:branch-compliance"
packet = {"frame_reconciled": True, "selection_design_recorded": True,
"response_status_complete": True, "missing_outcomes": 18,
"bounds_reported": False}
assert branch_audit_gate(packet) == "hold:missingness-range"
assert branch_audit_gate({**packet, "bounds_reported": True}) == "review:branch-compliance"
Performance and operating cost
The release gate is O(1); checking a frame of N branches and n selected responses is O(N+n) expected time with indexed IDs. A simple formula takes almost no compute, while tracing branch eligibility and missing outcomes determines whether the formula means anything.
Common Mistakes
- Calling a judgment sample a simple random draw.
- Calculating a finite-frame standard error on respondents without a response assumption.
- Collapsing refused, unreachable and ineligible branches into one silent exclusion.
- Declaring the population pass rate certain because most branches were sampled.
Read next
- Finite-frame sampling: adjust uncertainty for sampling without replacement
- Nonresponse bounds: show what missing binary outcomes could change
- Population, estimand and sampling frame: name the quantity before calculating
- Survey uncertainty: count sampled clusters, strata and weight concentration
- Project: calibrate a contact-center survey without hiding sparse shifts
Continue the workflow: Project: audit a parcel-damage rate across uneven depots.
