Each point is a 3-feature sample (x, y, z). For every feature the simulator computes the population mean μ and standard deviation σ, then a per-axis Z-score for each sample:
z_i = (x_i - μ) / σ
Flag as outlier if max(|z_x|, |z_y|, |z_z|) > threshold
This is the classic univariate outlier-detection rule used as a first-pass data-cleaning step before statistical modeling: any feature that lands more than a chosen number of standard deviations from its own mean gets flagged, independent of the other features.
- Sample size / outlier fraction — regenerates a synthetic dataset: a correlated Gaussian "clean" cluster plus a fraction of points drawn from a wider, shifted distribution to simulate sensor glitches or bad records.
- Threshold slider — moves the acceptance boundary; a lower threshold flags more points (more sensitive, more false positives), a higher one flags fewer (more conservative, may miss real anomalies). 2–3σ is the common rule-of-thumb range.
- Hide flagged / Show all — toggles whether flagged points stay visible (dimmed red) or are removed from view entirely, mirroring the "drop outliers" step of a cleaning pipeline.
- Correlation readouts — Pearson correlation between the x and y features, computed on the raw data and again after removing flagged points, showing how a handful of outliers can distort a statistical relationship even when most of the data is well-behaved.
Real-world relevance: this exact Z-score screen is a standard first step in data-science pipelines — before fitting a regression, clustering model or dashboard, analysts routinely flag and review points that fall far outside each feature's normal range.