Benford's Law example

Here is a quick example of using Benford’s Law to analyze the size of cities in the UK.

I copied and pasted the city sizes from Population of Cities in United Kingdom (2022) into a clipboard input and interpreted it as tab separated value.

I then extract the first digit and counted how many time each first digit appeared. Finally I sorted by the first digit to give:


You can download the .transform file here:

benford-UK-towns.transform (12.0 KB)

The number of 1s and 2s looks low, but it is quite a small sample.

1 Like