pbenf: Probability Mass Function for Benford's Distribution

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/Benford_tests.R

Description

Returns the complete probability mass function for Benford's distribution for a given number of first digits.

Usage

1
pbenf(digits = 1)

Arguments

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.

Details

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.

Value

Returns an object of class "table" containing the expected density of Benford's distribution for the given number of digits.

Author(s)

Dieter William Joenssen Dieter.Joenssen@googlemail.com

References

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]

See Also

qbenf; rbenf

Examples

1
2
#show Benford's predictions for the frequencies of the first digit values
pbenf(1)

Example output

         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 

BenfordTests documentation built on May 1, 2019, 8:07 p.m.