benfordslaw
is Python package to test if an empirical (observed) distribution differs significantly from a theoretical (expected, Benfords) distribution. The law states that in many naturally occurring collections of numbers, the leading significant digit is likely to be small. This method can be used if you want to test whether your set of numbers may be artificial (or manipulated). If a certain set of values follows Benford's Law then model's for the corresponding predicted values should also follow Benford's Law. Normal data (Unmanipulated) does trend with Benford's Law, whereas Manipulated or fraudulent data does not.
Assumptions of the data:
⭐️ Star this repo if you like it ⭐️ #
pip install benfordslaw
from benfordslaw import benfordslaw
On the documentation pages you can find detailed information about the working of the benfordslaw
with many examples.
Please cite in your publications if this is useful for your research (see citation).
See LICENSE for details.