Sampling & Bias 3D Simulator — Selection Bias Interactive

Interactive 3D sampling simulator with a 100-member population, a selection gate, a collected sample strip and a population-versus-sample mean comparison, plus live charts, equations, guided experiments and a quiz.

← Statistics & Data Science Labs
About this tool — how it works & FAQOpen ▾Close ▴

About the Sampling & Bias 3D Simulator

This simulator draws from a population of 100 members, 70 with a low score and 30 with a high score. Switch between uniform population sampling and a selection rule that over- or under-picks the high-score group, then compare the sample mean with the true population mean.

What the simulator shows

• A real-time 3D scene with 4 inspectable parts (Entire100-member population, Selection gate, Collected sample strip and Population versus sample mean), with home view, focus-selected-part, auto-rotate, expand, instrument-cover and hide-labels scene tools, plus a model response curve beneath the scene. • Experiment controls: Selection mechanism (Uniform population sampling, Unequal group selection); High-group selection probability (0.05-0.95); Repeatable random seed (1-99); show animated explanatory markers; pause/resume, 0.1 s and 1 s single-step buttons, four playback speeds and a restart button. • A Curves & measurements tab with a parameter-comparison chart, a live-measurements chart, the model equations and snapshot readouts (Draws collected; Population mean; Expected mean under selection rule; Current sample mean; Expected selection bias; Observed high-group share). • An Experiments tab with 2 guided presets (over-select high scores and representative selection) and a Model verification bench that runs independent fresh models, plus a timestamped event log and a copyable trial report. • A Learn & assess tab with guided lessons, a knowledge-check quiz with reset and a written model-scope statement linking to a technical reference.

Representative versus unequal selection

With uniform sampling every member is equally likely to be drawn, so the expected sample mean equals the population mean of 16 (0.7 times 10 plus 0.3 times 30). With unequal selection you set the probability q that a draw comes from the high-score group, and the expected mean becomes (1 - q) times 10 plus q times 30.

The lab reports the population mean, the expected mean under the chosen rule, the current sample mean, the expected selection bias and the observed high-group share, so you can separate random noise from systematic bias.

More data does not cure bias

A larger sample reduces random noise around the selection mean but does not move that mean, so a big biased sample is simply a precise estimate of the wrong quantity. Drawing is done with replacement, so the population is unchanged after each draw and members can be selected repeatedly.

The population is a two-group toy model and no weighting correction is applied; the point is to see the mechanism, not to estimate a real survey. Each run stops after 500 draws.

Frequently asked questions

Does a larger biased sample guarantee an unbiased result?

No. More draws shrink random noise around the selection mean, but they do not change where that mean sits. If the selection rule over-picks one group, the sample mean converges to the biased value.

What does sampling with replacement mean here?

After each draw the member goes back into the population, so the population is unchanged and the same member can be selected again. Draws are independent of one another.

How is the expected selection bias calculated?

It is the expected mean under the selection rule, (1 - q) times 10 plus q times 30, minus the population mean of 16. At q = 0.3 the rule matches the population and the bias is zero.

Can weighting fix a biased sample?

In practice weighting can correct known selection probabilities, but this lab deliberately applies no correction so you can see the raw effect of the selection mechanism.

Related tools & guides