pbenf {BenfordTests}R Documentation

Probability Mass Function for Benford's Distribution

Description

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

Usage

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}\left(1+ d_k^{-1} \right)

where d_k \in \left( 10^{k-1},10^{k-1}+1, \ldots, 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

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

[Package BenfordTests version 1.2.0 Index]