Zero Is not at all a lacker

Lagging digits

Assume we take Pi out to an infinite amount of decimal places. We cannot determine the last digit of Pi, because there is no last digit, the string of random numbers goes to infinity. However, because there is no repeating pattern in the decimal portion of Pi we can assume that all numbers are equally likely to be the next number in the sequence as the length of the decimal portion goes to infinity. This in effect defines the next number in the infinite sequence as a random event. This means that each number is equally likely to be the next number so each has a 1/10 chance. Therefore, the occurence of each digit should be equal once we reach an infinite number of decimal places.

This is supported by looking at the differences between the occurence of each number over time as compared to the total number of occurences. The percentages shrink rather rapidly as the order of magnitude of the number of occurences increases.

The implications of this on the upcoming digits in the sequence are rather interesting, as this would mean that zero is actually more likely to occur than the other numbers, something of a paradox considering the random nature of the decimal place string.

Re: Lagging digits

Chris,

Your statement, "However, because there is no repeating pattern in the decimal portion of Pi we can assume that all numbers are equally likely to be the next number in the sequence ..." isn't actually correct.

Here is a counterexample. Take the number 1.01001000100001000001... It has no repeating pattern, yet not all digits are equally likely.

It has been conjectured that pi is "normal" which, mathematically speaking, means that all digits are equally likely and that other properties of randomness are adhered to. However, this has yet to be proven.

My penny's worth

Surely Chris's comment above that "zero is more likely to occur" is just an example of the innate problem with probability people seem to have. If I flip a coin ten times and it lands tails-up seven times, that does not mean that my next coin flip is more likely to be heads to "even the score". If you bet on a horse ten times and it lost every time, you wouldn't bet on it again as it was now due a win...

Were pi to be calculated to infinity, then - assuming it's a normal number - then working from the fists 10,000,000 digits we would expect an infinite number of fours and infinity-minus-1653 zeroes.

BTW Eve I think you need to bring back the green antenna photos. I was just leafing through a 1995 copy of Mac Format magazine and saw you beaming out at me as 'one of the coolest sites on the web'.

And another thing...

If you really want to take this to it's logical extreme, work out the frequencies of 1 and 0 in the binary expression of pi. Intuition tells me that 1 would be way ahead, but I can't explain why I think this.

Memorizing PI

I got started being interested in pi when I visited my brother last month and my 14 year old nephew told me he would get an extra 30 points in math if he could memorize pi to the 74th decimal place. I helped him figure out ways to remember the numbers and am happy to say that my nephew called me a couple of weeks ago to tell me that he did get the extra points.

I never memorized numbers longer than 16 digits before (my credit card numbers) or rather 19 numbers if you can really count my checking number which includes the routing number. I was curious to find out how far I can memorize pi. I have adopted the credit card system, by separating the numbers in pi in groups of 4s. So far I am only up to the 30th group of 4's. That's 120 numbers. Wow!!! Not being a genius, and being a grandma, I am rather impressed with myself, LOL!!!

So I have issued a challenge to my 3 children, my 4 grandchildren that I would pay $1 for each group of 4's they could remember both in sequence and at random. Thus each would be able to earn up to $60.

I love to play blackjack, therefore I remember pi by associating the numbers with the game.

For instance: group 2 is 9265 = 2 double down hands, group 4 is 7932 = 21, group 5 is 3846 = 21, group 8 is 7950 = 21, group 15 is 4944 = 21, group 21 is 8628, happy that the dealer has 3 eights instead of 3 sevens! :)

Group 16 = 5923, my ex husband's work extension, not that I care because I don't have his phone number (I deleted them from my cell phone as well as from my own memory). :))

I was born in the 105th group of 4's in pi after the decimal point. I told my 3 kids I would give them $200 each if they tell me theirs...well I'm just relieved that I have only 3 children. I would be broke otherwise, heh! I had to tell my nieces and youngest son's fiancee the offer was good only for my 3 children, much to their dismay.

Well, I've just memorized 3 more groups. Maybe I will let the kids to up to 50, depending on how far I can go by Feb. 16 weekend, which is when I will see all of the grand/kids. First I will demonstrate that even I can recite the numbers, sequentially or at random. So I am not asking them to memorize anything that their old mother/grandma cannot do herself. Oh, I'm up to group 36 now.

other bases

Pi is obviously going to look different if we calculate it in base 8 or base 12 or any base other than 10. Do we have any workups available of what the digit frequency looks like if we use some other base? Do we still have 'laggers', and -- if so -- are they the same ones? I doubt that they would be the same, but it would be an interesting experiment.

Because...

If (assumption) the digits of pi are pseudorandom, zero will tend to lag, depending on how you average things out. We choose by tradition not to write in a trailing zero after the decimal point, so any 'lengths' of pi that would otherwise terminate with a zero, don't. The non-zero digit that precedes the zero gets a double score!

pi in base 2

I've been looking at the frequency of the digits of pi in base 2. So far up to the first 400 bits, 0 occurs 57% of the time, 1 occurs 43 % of the time. Running a chi-square test on this gives a result of this being random of only 7%. In other words with this initial sample, there is enough of a bias to warrant further testing. I also ran a test on 2 digit bits and the bias is even stronger. Does anyone know of a site that has pi in base 2 or am i going to have to convert a base 10 site?

Improper Math

@ chris campbell, post "lagging digits".

"The implications of this on the upcoming digits in the sequence are rather interesting, as this would mean that zero is actually more likely to occur than the other numbers, something of a paradox considering the random nature of the decimal place string."

This is an improper usage of the law of averages. The law of averages does not take in to account events previously occurred. It merely states that as more trials occur, or the limit of trials approaches infinity, the experimental probability should converge on the theoretical probability. I agree with the idea that if you look from zero the proportion of any digit to total (experimental probability) should approach the theoretical probability; henceforth, the difference should occur more often to have the proportion equal out; however, it still an improper usage of determined fact.

Shannon entropy of pi

I recently made a C program to calculate the entropy of pi in digits of base 256 (like bytes)
and I got 8 this means that the "disorder" of the digits is maximum and you cannot compress the digits
because Shannon entropy says that you will need 8 bits to represent each byte (no compression at all)
recently made another C programm to average the PI digits and all the first 10 million digits have the same probabilities with digits in base 10 of arbitrary len.
The shannon entropy program can be found here
If you are going to apply it to PI you will need to get PI in bytes (not base 10)

Pi digits are equiprobable

Theoretically, each decimal digit of Pi can be viewed as independent
of the other, and the events may be hypothesized as equiprobable,
with probability, 0.10.

Observably, the discrepancies between the proportion of the digits,
for the first set of 100 digits are so pronounced. However,
as the set of digits increases, through 100,000 up to
10,000,000 ,these discrepancies in proportion decreases, and
,eventually, converges to zero.

In other words, the theoretical probabilities and the relative frequencies
of the digits almost coincide, according to the law of large numbers,
hence the leveling of the bars in the last chart. Thus, the decimal
digits of Pi are equiprobable each with probability 0.10 of occurrence.

Mathematical beauty in the eyes of the beholder

Theoretically, each decimal digit of Pi can be viewed as independent of the other, and the events may be hypothesized as equiprobable, with probability, 0.10.

Observably, the discrepancies between the proportion of the digits, for the first set of 100 digits are so pronounced. However, as the set of digits increases, through 100,000 up to 10,000,000 ,these discrepancies in proportion decreases, and ,eventually, converges to zero.

In other words, the theoretical probabilities and the observed relative frequencies of the digits almost coincide, according to the law of large numbers, hence the leveling of the bars in the last chart. Thus, the decimal digits of Pi are equiprobable each with probability 0.10 of occurrence.

'pi' is to Genesis 1:1 as ?e? is to John 1:1. There are many examples, which are clearly beyond the capability of human authorship ? not even in field of Actuary.

Pi in base 2

There are some obvious factors that must be considered - for the numbers 0-9 in base 10, each number occurs only occurs once, and thus in a completely random normal number, it each digit would have a 1/10 chance of appearing in any one place and would thus be expected to appear 10% of the time. In binary there are only two digits - 0 and 1 - but do they both have the same frequency? Think of the process of getting pi in binary. You would start with base 10. Do the numbers 0-9 in dec, when converted to binary, yield just as many 0's as 1's? Well, in fact, no. There are eleven 0's and fifteen 1's. From this knowledge, you would expect the infinite expansion of pi would be comprised of about 42.3% zeros and 57.7% ones. That's close to 57% ones, so problem solved.

too smooth?

The number of each digit seems to deviate too little from the expected. For the first n digits of pi, we can model the number of occurrences of any specific digit as the sum of n independent identically distributed Bernoulli random variables each with 10% (p=0.1) probability of being one and 90% (q=0.9) probability of being zero. The average of such is np which, for n=10,000,000 (ten million) is 1,000,000. The standard deviation is sqrt(npq)=948. And yet the most deviate digit is 1 which lags its expectation by only 667. So none of the ten digits fall more than 0.71 standard deviations away from the expected value. Small sample size or a hint of some deep truth about pi?

I suspect small sample size because if we back up to the first million digits, we get a standard deviation of 300 which is exceeded by 5s and 6s.