Survey Sampling Design

A population of units on a map, shaded by value, sampled by simple random, stratified, cluster, systematic, convenience or voluntary-response designs. The learner draws samples, repeats them a thousand times and compares where the estimates centre (bias) and how far they spread (SE) under frame coverage, nonresponse and measurement-offset sliders, seeing which designs are unbiased, which gain precision, and which biases no sample size cures.

Used in: Introduction to Statistics

Props

PropTypeDefaultDescription
titlestringSurvey sampling designsCard title.
populationobject{ N: 400, layout: "grid", gradient: true, strata: 4, clusters: 20 }The synthetic population (values 0-100). Keys: N (20-900 units), columns (grid width; default about sqrt(N), a multiple of `period` when periodic), layout ('grid', or 'frame' to number the rows in frame order), gradient (values rise from the top-left to the bottom-right corner, so convenience and undercoverage are biased), strata (2-10 horizontal bands), homogeneousStrata (strata differ strongly, little variation inside: stratifying gains precision), clusters (2-100 blocks), homogeneousClusters (units in a block are alike: cluster samples lose precision), periodic + period (a repeating pattern in frame order that a matching systematic interval hits every time), seed.
designsstring[]all six (or [design] when only `design` is given)Designs the learner can switch between: simple-random, stratified, cluster, systematic, convenience, voluntary-response.
designstringfirst of `designs`Design selected at the start.
nnumber25Requested sample size (stratified uses proportional allocation; cluster takes about n/cluster-size whole clusters; systematic uses k = floor(frame size / n); voluntary response gets about n volunteers).
nValuesnumber[](none)Up to 4 sample sizes offered as a toggle instead of the n slider, e.g. [10, 100] to show that variability shrinks with n and bias does not.
frameCoveragenumber1Share of the target population on the sampling frame (0.1-1); when given, a slider appears. The units left off are the bottom-right corner, hatched on the map.
nonresponseRatenumber0Average share of selected units that do not answer (0-0.95); when given, a slider and a 'depends on value' toggle appear.
measurementOffsetnumber0Added to every recorded value (a miscalibrated instrument); when given, a slider appears.
parameters{name, min, max, initial, step?, label?}[](none)Show sliders and set their ranges. Names: n, frameCoverage, nonresponseRate, measurementOffset. A listed slider is shown even when its top-level prop is not given.
nonresponseDependsOnValuebooleantrueUnits with high values are less likely to answer (nonresponse bias); false makes nonresponse purely random (smaller n, no bias).
responseDependsOnValuebooleantrueVoluntary response: units with high values are more likely to volunteer; false makes volunteers a random subset.
rerunsnumber1000Samples drawn by the Repeat button (10-5000).
showRerunsbooleanfalseStart with `reruns` samples already drawn for every listed design (and every n in nValues), so the comparison is visible at once.
valueLabelstringvalueName of the measured variable, used in the axis and captions.
seednumber | string1Seed for the samples (the population has its own `population.seed`).
controlsstring[]all controls shownIds of the hideable readouts to show (see the controls registry: readout.frame-term, readout.xbar-symbol, readout.probability-badge, readout.sampling-error, readout.bias, readout.spread, readout.standard-error-term). Core controls always show. Page building fills this from the subject's topic scope.