Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/Benford_tests.R
Returns the complete probability mass function for Benford's distribution for a given number of first digits.
1 | pbenf(digits = 1)
|
digits |
An integer determining the number of first digits for which the pdf is returned, i.e. 1 for 1:9, 2 for 10:99 etc. |
Benford's distribution has the following probability mass function:
P(d_k)=log_{10}≤ft(1+ d_k^{-1} \right)
where d_k \in ≤ft( 10^{k-1},10^{k-1}+1, …, 10^k-1 \right) for any chosen k number of digits.
Returns an object of class "table
" containing the expected density of Benford's distribution for the given number of digits.
Dieter William Joenssen Dieter.Joenssen@googlemail.com
Benford, F. (1938) The Law of Anomalous Numbers. Proceedings of the American Philosophical Society. 78, 551–572.
Joenssen, D.W. (2013) Two Digit Testing for Benford's Law. Proceedings of the ISI World Statistics Congress, 59th Session in Hong Kong. [available under http://www.statistics.gov.hk/wsc/CPS021-P2-S.pdf]
1 2 | #show Benford's predictions for the frequencies of the first digit values
pbenf(1)
|
1 2 3 4 5 6 7
0.30103000 0.17609126 0.12493874 0.09691001 0.07918125 0.06694679 0.05799195
8 9
0.05115252 0.04575749
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.