Attention readers: This blog has moved to a new home at https://chenghlee.wordpress.com/.

Monday, August 11, 2008

Interesting fact about π

Matt Springer (Built on Facts), in responding to a post on "Good Math, Bad Math", highlights an interesting property of π, namely, that it is (widely believed to be) a normal number.

Roughly speaking, a number x is said to be normal in base-b if its digits exhibit a uniform distribution, such that the asymptotic probability of every length k string occurring within the representation of x in base-b is 1/bk. For example, for a number normal in base-10, the probability of observing a given digit '0' through '9' is 1/10, while the probability of observing a string of length 3 ('000' through '999') is 1/1000.

We can observe this using the first 1.25 million digits of π from Project Gutenberg and a simple Perl script. If π is a normal number, then the observed frequency of each digit '0' through '9' should be around 10%, which is precisely what we see:

Digit 01234 56789
% observed 10.01 9.9710.0110.03 9.99 10.03 9.9510.0010.0010.02

Using this same script, we can also observe that within the first 1.25 million digits of π, length 3 strings occur at a frequency of about 1/1,000 and length 4 strings at a frequency of about 1/10,000; this is in line with our expectations that π is a normal number.

Of course, this exercise doesn't actually prove that π is a normal number. To date, no one has proven that π and other "interesting" numbers like e, which we strongly suspect are normal numbers, actually are.

One final comment: While the digits and finite length strings in π appear in a uniform distribution, π and the digits within it aren't actually "random" or "randomly distributed", at least not in the algorithmic sense. This is because fairly simple formulas that will generate the digits of π, though those are the topic for another discussion. I mention this only to highlight the fact that being pedantic about vocabulary does matter when talking about math.

No comments: