Outliers: z-score and modified z-score method in JavaScript
✓ Published0🌍 Public
RRestuta
Last edited Nov 22, 2020
Created on Nov 22, 2020
This example demonstrates two statistical methods for identifying outliers in a dataset: the classic z-score and the modified z-score using median absolute deviation. The JavaScript code computes z-scores for each data point via `d3-array`'s `mean` and `deviation`, flagging values beyond ±3, while the modified approach uses Ramda’s `median` function and a constant threshold of ±3.5. The output maps every input item to its corresponding score, showing how each method differs in robustness to skewed distributions.
AI-generated description