FREQUENCY( ) function

Returns the expected Benford frequency for sequential leading positive numeric digits to a precision of eight decimal places.

Syntax

FREQUENCY(digit_string)

Parameters

Name Type Description
digit_string character

A character string containing digits (0-9) to identify the frequency for. digit_string must be a positive number, and leading zeros are ignored.

Output

Numeric.

Examples

Basic examples

Returns 0.00998422:

FREQUENCY("43")

Returns 0.00000000:

FREQUENCY("87654321")

Note

The result is 0.00000000495, but because Analytics computes to a precision of eight decimal places, a zero value is returned.

Remarks

How it works

FREQUENCY( ) returns the expected Benford frequency for sequential leading positive numeric digits to a precision of eight digits. It lets you perform limited Benford tests for specific situations.

Using this function for specific digit combinations

You can use this function instead of the BENFORD command if you want to focus on specific digit combinations. For example, when auditing insurance claims that have approval limits at specified claim amounts, you could use the FREQUENCY( ) function to investigate amounts just under an approval threshold.

To investigate claims valued close to an approval limit of $5,000, you could select the range from $4,900 through $4,999. First, count the total number of records, then use a filter to count the records for which LEADING( ) returns 49, and compare the ratio of the two counts to the value you get for FREQUENCY("49").

This is faster than running a complete analysis on a table of a million records, and it does not generate a large table or lengthy entries in the command log.

Specifying strings longer than six digits

Specifying strings longer than six digits can result in zero values. Calculations for strings longer than six digits may require greater precision than Analytics's limit of eight decimal places.

ACL Scripting Guide 14.1