prob_second_digit: Calculate the probabilty of a second digit.

View source: R/digit_probability.R

prob_second_digitR Documentation

Calculate the probabilty of a second digit.

Description

Can be used to detect bias in number reporting. For example, when rounding up is occuring, numbers with the second digit as zero will be overrepresented, while higher numbers like (7,8,9) will be underrepresented in the sample of numbers.

Usage

prob_second_digit(d2)

Arguments

d2

Integer or vector of integers that presents the second digit.

Value

Double or Numeric vector

Examples

# calculate probabilty of second digits
prob_second_digit(0:9)

# cumulative probabilty must be equal to one
sum(prob_second_digit(0:9))


Glender/BenfordStats documentation built on April 24, 2022, 9:01 p.m.