-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
c: featureRequest for new featureRequest for new featurem: financeSomething is referring to the finance moduleSomething is referring to the finance modulep: 1-normalNothing urgentNothing urgents: acceptedAccepted feature / Confirmed bugAccepted feature / Confirmed bug
Milestone
Description
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 featureRequest for new featurem: financeSomething is referring to the finance moduleSomething is referring to the finance modulep: 1-normalNothing urgentNothing urgents: acceptedAccepted feature / Confirmed bugAccepted feature / Confirmed bug