Pi: how many digits do you need?

The most basic explanation of Pi is that it is the ratio of the circumference to the diameter for a circle. That seems simple enough, but it turns out that Pi is an irrational number - so you can't just write it down. Oh, I know that you are an uber-geek and you could recite the first 80 digits of Pi. But the question is - how many digits are enough?

In this post, I am going to assume that we don't know the true value of Pi (which is essentially true). I can then use propagation of error techniques to see how dependent different calculations are on the value of Pi.

Super Brief Intro to Uncertainty

I still can't believe I haven't put a post together on the basics of measurement and uncertainty. Add that to the todo list. The most important idea in measurements is that they are not exact values. Let me start with my favorite example. Suppose I have a table that I want to know the area of. To do this, I measure the length and the width. The value I come up with for the length is 133.2 cm. But what does this mean? Is this the exact length of the table? No. Two problems.

  • The table doesn't have an exact length. What does the length mean for a table? Is it a perfect rectangle? No. Is it even straight on the edges - probably not.
  • Even if it were a perfect table, would my measurement be perfect? No.

Maybe I measured this length a whole bunch of times and at different locations. This would give me an estimate of how the measurements are spread out. If I do the same for the width, I might get something like:

i-81d162aead96d5fe4a046bf3e4741628-2009-12-29_calculating_the_distance_to_the_sun_with_uncertainty_dot_physics_1.jpg

This means that the length of the table is almost certainly between 133.0 cm and 133.4 cm. If a similar thing can be said about the width, then this diagram could represent the area.

i-3f0717fb9bb69f493b2c3eeb4bef255f-2009-12-29_area_1.jpg

The point I would like to make - since the width and the length have uncertainty, the calculated area would have uncertainty. How do you determine this calculated uncertainty? I have three ways:

  • Use the extreme values of length and width to calculate the extreme values of the area (in this case the smallest area uses the smallest length and width). This is the method I use for my algebra-based physics labs.
  • Assume the error is small, linear, and normally distributed. In this case, you can use the partial derivatives of the functions to determine the relationship of the uncertainty for the measured stuff on the calculated stuff. Here is wikipedia's page on this, but I am not really going to go into the details.
  • Assume that if you measure the stuff a whole bunch of times, the data would be normally distributed. Write a program that generates normal data and use that to calculate tons of times the calculated value. Look at the spread of all these calculations to determine the uncertainty. I am not going to do this right now.

Back to Pi

Archimedes used 96 sided polygons to estimate the value of Pi. He showed that Pi was greater than 3 and 10/71 and less than 3 and 1/7th. This gives a decimal value from 3.14084507 to 3.142857143 (with no rounding). I could write this as an average and an uncertainty of about:

i-0deeaab4b465f658b6a4067b0d04463e-2010-03-12_la_te_xi_t_1_10.jpg

That is not too bad of a value. But what about pi = 3? Is that bad? First - according to Snopes, no state has ever proposed a law that would officially change Pi to 3. It is still a fun story. Anyway, in this case I could perhaps say:

i-efbf8fa548c07f15aea3c381ef8d7e78-2010-03-12_la_te_xi_t_1_11.jpg

I chose the uncertainty in this fictional Pi to be +/- 0.2 so that the range would cover the true value of Pi. Really, though you could in general write Pi as:

i-4ffd851715bf55bc40117e1957835bcb-2010-03-13_la_te_xi_t_1_12.jpg

Where Delta pi is the uncertainty in pi.

Some uses of Pi

So what effect does the uncertainty in Pi have on different uses of Pi? Let me start with something practical - the speedometer in your car. Basically, your speedometer needs Pi to make the conversion between angular velocity and linear velocity using:

i-f2369b7eeea5012c022de13ab4fd7471-2010-03-13_la_te_xi_t_1_13.jpg

I know, there is no pi in that equation. But, how do you know the angular velocity (omega)? If this is measured in revolutions per second (or minute) then you have to convert units. Let me write this as:

i-3080fbd6e70b31212a36b20b0c36d726-2010-03-13_la_te_xi_t_1_14.jpg

Now, I will assume that omega, r, and pi all have uncertainty. Then the uncertainty in the velocity would be (using the max-min method from above for simplicity):

i-79f17c9f9af8765ac1cbc5d572f397bf-2010-03-13_la_te_xi_t_1_15.jpg

And I would do a similar thing for the minimum value. I could average the difference between average and the max and the average and the min. (I will put these calculations in a spreadsheet for you).

What about the volume of a sphere? This same thing is used for calculating things such as - the volume of the sun or the volume of a spherical cow. Here is the volume of a sphere:

i-128f8e7a47dde1f62d266a0b94548abf-2010-03-13_la_te_xi_t_1_17.jpg

These two uses of Pi seem boring - but really this is the basis for many applications of pi. There are tons of others, but they are maybe more abstract (but just as important). Now, on the to the spreadsheet. I will put in some values for the stuff, but you can change them if you like.

Note - I don't know how to change the number of digits presented in google docs. Also, I seem to have hit a creative wall with uses of pi. How about you list your favorite use of Pi in the comments?

More like this

I'm old enough to remember the first pocket calculators, which had four-function arithmetic only, no trig, no logarithms, no pi. For any practical application, 355/113 would serve.

My favourite use is definitely eating, a close second is using one for a cheap gag.

(sorry, had to be done)

By aineolach (not verified) on 13 Mar 2010 #permalink

Nine decimal places. In fact, on most pocket calculators I still find it quicker typing 3.141592564 than finding the intrinsic pi function.

Short excerpt from Surely you're joking Mr. Feynman:

So Paul (Olum) is walking past the lunch place and these guys are all excited.
"Hey, Paul!" they call out. "Feynman's terrific! We give him a problem that can be stated in ten seconds, and in a minute he gets the answer to 10 percent. Why don't you give him one?"
Without hardly stopping, he says, "The tangent of 10 to the 100th."
I was sunk: you have to divide by pi to 100 decimal places! It was hopeless.

I can't think of any problem I've needed more than three decimal places, and GPS receivers use maybe ten or twelve I think. Very Long Baseline Interferometry might need more precision - I don't know. Past that, it's the mathematicians I guess.

From your snopes link:
Though the claim about the Alabama state legislature is pure nonsense, it is similar to an event that happened more than a century ago. In 1897 the Indiana House of Representatives unanimously passed a measure redefining the area of a circle and the value of pi. (House Bill no. 246, introduced by Rep. Taylor I. Record.) The bill died in the state Senate.

lordaxil stated "Nine decimal places. In fact, on most pocket calculators I still find it quicker typing 3.141592564 than finding the intrinsic pi function."

I suggest it would be more accurate if you typed 3.141592653.

Long ago, I calculated the maximum precision required to measure the circumference of the visible Universe to maximum possible precision.

As far as I remember, it was about 80 digits.

By Alex Besogonov (not verified) on 14 Mar 2010 #permalink

I like the idea of using normally distributed errors to represent uncertainty in pi, since the normal distribution depends on pi for its normalizing constant.

If an irrational number cannot be written as a simple fraction, is it proper to suggest that "the most basic explanation of Pi is that it is the ratio of the circumference to the diameter for a circle"? Or if that definition is correct, does it then follow that a diameter or a circumference cannot be a rational number?

A lighthearted pi-related blog post of mine from a while back continues to be popular with commenters. In it, I explore some of the consequences of trying to imagine a reality where pi=3.

One of the best search terms that anyone's ever used to find my blog was something like: "Is pi + pi equal to 3pi". I think that one's best left to the professionals (mathematicians or psychiatrists, you decide).

Or if that definition is correct, does it then follow that a diameter or a circumference cannot be a rational number?

They can't both be rational, a finding that was a source of great annoyance to Pythagoras.