AI Grounds
Open AI Grounds on a desktop
These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.
AI Grounds
These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.
Guided discovery
Change who gets observed, then change sample size.
The synthetic population has ten equally weighted records, values 1–10, with mean 5.5. The target is always all original records. Sampling uses replacement, so records can repeat.
Ideal random benchmark: every original record has equal chance and is observed. This counterfactual comparison does not promise to force real responses or recover exited records.
Show more or fewer retained observations from the same prepared sample. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.
Select another prepared sample under the same method and size. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.
Showing sample 1 of 20, with 40 observed records. Selection frame · Ideal random.
Each numbered dot is a sample mean, not an individual record. A double ring marks the selected sample. Orange dashed reference: population mean 5.5. Blue dotted reference: collection expectation 5.5000. The two references coincide in the ideal benchmark.
Twenty means range from 4.9000 to 6.0500. This finite illustrative batch is not the exact sampling distribution. Increasing size keeps the same full-population axis.
Statistic from retained observations.
5.8000
232 / 40
Target: all ten original records.
5.5000
(1 + 2 + … + 10) / 10
Expected mean under this collection rule.
5.5000
Σ(value × keep chance) / Σ(keep chance)
Sample 1: total 232 / observed size 40 = mean 5.8000. Signed observed gap = 5.8000 − 5.5 = +0.3000. Expected bias = 5.5000 − 5.5 = +0.0000.
Simulator candidate attempts to obtain these observations: 40. Recent observed values: 4, 6, 8, 10, 6, 6, 10, 3. Observed size counts retained records. Candidates represent invitations in Nonresponse; elsewhere they are simulator proposals, not actual invitations to excluded or exited records.
| Value | Declared biased mechanism | Active keep chance | Observed share |
|---|---|---|---|
| 1 | Outside frame | 1.0 | 0.1000 |
| 2 | Outside frame | 1.0 | 0.1000 |
| 3 | Outside frame | 1.0 | 0.1000 |
| 4 | Outside frame | 1.0 | 0.1000 |
| 5 | Outside frame | 1.0 | 0.1000 |
| 6 | In frame | 1.0 | 0.1000 |
| 7 | In frame | 1.0 | 0.1000 |
| 8 | In frame | 1.0 | 0.1000 |
| 9 | In frame | 1.0 | 0.1000 |
| 10 | In frame | 1.0 | 0.1000 |
| Sample | Total | Mean | Candidate attempts |
|---|---|---|---|
| 1 · selected | 232 | 5.8000 | 40 |
| 2 | 224 | 5.6000 | 40 |
| 3 | 209 | 5.2250 | 40 |
| 4 | 242 | 6.0500 | 40 |
| 5 | 225 | 5.6250 | 40 |
| 6 | 205 | 5.1250 | 40 |
| 7 | 222 | 5.5500 | 40 |
| 8 | 225 | 5.6250 | 40 |
| 9 | 211 | 5.2750 | 40 |
| 10 | 233 | 5.8250 | 40 |
| 11 | 237 | 5.9250 | 40 |
| 12 | 228 | 5.7000 | 40 |
| 13 | 223 | 5.5750 | 40 |
| 14 | 230 | 5.7500 | 40 |
| 15 | 196 | 4.9000 | 40 |
| 16 | 225 | 5.6250 | 40 |
| 17 | 226 | 5.6500 | 40 |
| 18 | 231 | 5.7750 | 40 |
| 19 | 201 | 5.0250 | 40 |
| 20 | 230 | 5.7500 | 40 |
The original target is a fixed bounded toy population. Every candidate independently selects one of ten records uniformly with replacement. The biased mechanism changes observation probability; every accepted record remains available for later draws. Nonresponse is newly simulated per invitation, while frame membership and survivor flags are fixed. These are illustrative mechanisms, not a causal model of why real records disappear.
A seed-1309 32-bit generator prepares 20 nonoverlapping blocks of 10000 candidate attempts, consuming two uniform positions per attempt. The first chooses a record, the second tests observation probability. Each sample shows its first n accepted records. Size edits preserve that retained prefix; changing scenario or method filters the same candidates. Finite pseudorandom blocks do not prove independence, convergence or monotone improvement.
Expected bias concerns the collection expectation minus the original target; one observed gap is finite sample error. These rules push upward by construction. Missingness need not bias a mean, and real bias can have either sign. Survivor-only sampling can suit a survivor-only target; here the target deliberately includes exited records. Ideal random is a comparison, not a practical correction promise. Weighting, standard error, intervals and identification from missing data are outside this lesson.
Berkeley SticiGui · Frame and nonresponse bias