Benford's Law Random Number Generator

Pseudo-random number generator that generates sets of numbers which conform to Benford's Law
233 Downloads
Updated 17 Aug 2015

This function generates arrays of pseudo-random numbers which conform to Benford's Law.
Benford's Law refers to the frequency of first digits in numerical datasets from natural real-life sources, such as populations of cities and heights of mountains. According to this law, 1 is the first digit in about 30% of the time and 9 is the first digit only in about 5% of the dataset values. The values from real-life datasets have to spread across multiple, preferrably at least 3 orders of magnitude to fit the distribution well.

Cite As

Jan Zdenek (2024). Benford's Law Random Number Generator (https://github.com/janzd/BenfordRNG), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2014a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Versions that use the GitHub default branch cannot be downloaded

Version Published Release Notes
1.0.1.0

added function for calculating frequencies of first digits

1.0.0.0

To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.