Skip to content

Follow Benford's law for finance amounts. #1094

@RelatedTitle

Description

@RelatedTitle

Clear and concise description of the problem

Currently, the amount's first digits are uniformly distributed (each digit having ~11.11% probability). In the real world, however, this is rarely the case, especially for financial data. This is what Benford's law demonstrates. The actual distribution is as follows.

Digit Probability
1 30.1%
2 17.6%
3 12.5%
4 9.7%
5 7.9%
6 6.7%
7 5.8%
8 5.1%
9 4.6%

The current implementation, although more random, is less realistic.

I am planning to submit a PR for this issue if accepted.

Suggested solution

Implementing an RNG function that follows Benford's law would provide more realistic data.

Alternative

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

c: featureRequest for new featurem: financeSomething is referring to the finance modulep: 1-normalNothing urgents: acceptedAccepted feature / Confirmed bug

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions