### Benford’s law

13 Apr 2012 @ 1:40 PM

I am trying to find some use of the Benford’s law in testing.

“Benford’s law, also called the first-digit law, states that in lists of numbers from many (but not all) real-life sources of data, the leading digit is distributed in a specific, non-uniform way. According to this law, the first digit is 1 about 30% of the time, and larger digits occur as the leading digit with lower and lower frequency, to the point where 9 as a first digit occurs less than 5% of the time. This distribution of first digits is the same as the widths of gridlines on the logarithmic scale. Benford’s law also gives the expected distribution for digits beyond the first, which approach a uniform distribution as the digit place goes to the right.” –wikipedia

I thought I found a solution when googling by “1”,”2”,”3” or “one”, “two”, “three” or using even quotes for the same searches to be the exact match. But then I realized that I can hit a search result containing “two hundred and twenty one” when searching for “one” so I am very far from applying the principle in a relevant way.

Well it seems to make some sense though based on the graph, so maybe it’s some sort of applicable variation.

But let’s try something more relevant:

List of countries by number of mobile phones in use

http://en.wikipedia.org/wiki/List_of_countries_by_number_of_mobile_phones_in_use

 1 China 1,010,000,000 2 India 911,168,193 3 United States 327,577,529 4 Indonesia 250,100,000 5 Brazil 245,200,000 6 Russia 224,260,000 7 Japan 121,246,700 8 Pakistan 114,610,000 9 Germany 107,000,000 10 Nigeria 90,583,306 11 Mexico 88,797,186 12 Italy 88,580,000 13 Bangladesh 86,550,000 14 Philippines 86,000,000 15 United Kingdom 75,750,000 16 Vietnam 72,300,000 17 Egypt 71,460,000 18 Turkey 66,000,000 19 France 58,730,000 20 Thailand 69,000,000 21 Iran 68,000,000 22 Ukraine 54,377,000 23 South Korea 52,510,000 23 Spain 50,890,000 25 Argentina 50,409,800 26 Poland 47,153,200 27 Colombia 46,147,937 28 South Africa 42,300,000 29 Algeria 33,000,000 30 Venezuela 27,400,000 31 Peru 27,100,000 32 Taiwan 25,412,000 33 Romania 22,800,000 34 Canada 25,543,862 35 Morocco 27,050,000 36 Netherlands 20,000,000 37 Australia 21,260,000 38 Saudi Arabia 46,000,000 39 Malaysia 30,379,000 40 Chile 21,000,000 41 Guatemala 17,571,895 42 Sri Lanka 17,359,312 43 Ecuador 15,900,000 44 Portugal 14,500,000 45 Nepal 14,240,670 46 Hong Kong 13,264,896 47 Belgium 11,822,000 48 Hungary 11,833,000 49 United Arab Emirates 11,540,040 50 Bulgaria 10,655,000 51 Israel 9,319,000 52 Denmark 7,000,000 53 Azerbaijan 7,000,000 54 Jordan 6,010,000 55 Singapore 7,289,000 56 New Zealand 4,620,000 57 Estonia 1,982,000 58 Lebanon 2,720,000 59 Lithuania 4,960,000 60 Montenegro 1,294,167 61 North Korea 1,000,000

Starting digits for the number of mobile phones in this list:

 Starting digit Occurrences Percent 1 17 27 2 13 21 3 3 4 4 6 9 5 5 8 6 4 6 7 6 9 8 4 6 9 3 4

Considering that the data sample has only 61 records and for the first digits we have a success, I think its “relevant enough” and the example is “acceptable”.

ShareThis
Posted By: Eusebiu Blindu
Last Edit: 13 Apr 2012 @ 08:57 PM

Tags:
Categories: General

### Responses to this post » (None)

Last 50 Posts
Back
• Users » 2
• Posts/Pages » 138
Change Theme...
• Void
• Life
• Earth
• Wind
• Water
• Fire
• Light « Default

#### Agile Testing Days prequel

• No categories

#### bug bounty

• No categories

#### Bugs

• No categories

#### Carnivals

• No categories

#### challenge

• No categories

#### Classic Tests

• No categories

#### conferences

• No categories

#### EWT

• No categories