Learn R Programming

lmomco (version 2.5.3)

cdfben: Cumulative Distribution Function of the Benford Distribution

Description

This function computes the cumulative probability or nonexceedance probability of the Benford distribution (Benford's Law) given parameters defining the number of first M-significant digits and the numeric base. The cumulative distribution function has a somewhat simple analytical form by direct summation of the probability mass function (pmfben).

Usage

cdfben(d, para=list(para=c(1, 10)), ...)

Value

Nonexceedance probability (\(F\)) for \(x\).

Arguments

d

A integer value vector of M-significant digits.

para

The number of the first M-significant digits followed by the numerical base (only base10 supported) and the list structure mimics similar uses of the lmomco list structure. Default are the first significant digits and hence the digits 1 through 9.

...

Additional arguments to pass (not likely to be needed but changes in base handling might need this).

Author

W.H. Asquith

References

Benford, F., 1938, The law of anomalous numbers: Proceedings of the American Philosophical Society, v. 78, no. 4, pp. 551--572, https://www.jstor.org/stable/984802.

Goodman, W., 2016, The promises and pitfalls of Benford’s law: Significance (Magazine), June 2015, pp. 38--41, tools:::Rd_expr_doi("10.1111/j.1740-9713.2016.00919.x").

See Also

pmfben, quaben

Examples

Run this code
para <- list(para=c(2, 10))
cdfben(c(15, 25), para=para) # 0.2041200 0.4149733

sum(diff(cdfben(seq(10,99,0.1), para=para))) + cdfben(10, para=para) # 1

Run the code above in your browser using DataLab