Microsoft Office Tutorials and References

In Depth Information

**Generating and Using Random Numbers**

Mathematicians have proven that pi is an
irrational number
— in other words,

it has an infinite number of decimal places. They have calculated the value

of pi to many thousands of decimal places, but you don’t need that level of

precision in most calculations. Many people use the value 3.14159 for pi, but

the PI function in Excel does a bit better than that. Excel returns a value of pi

accurate to 15 digits — that is 14 decimal places in addition to the integer 3.

This function has no input arguments. The function uses this syntax:

=PI()

In Excel, the PI function always returns 3.14159265358979, but initially it may

look like some of the decimal points are missing. Change the formatting of the

cell to display numbers with 14 decimal places to see the entire number.

If you know the circumference of a circle, you can calculate its diameter with

this formula:

diameter = circumference ÷ pi

If you know the diameter of a circle, you can calculate its circumference with

this formula:

circumference = diameter × pi

If you know the diameter of a circle, you can calculate the area of the circle.

A component of this calculation is the
radius,
which equals one-half of the

diameter. The formula is:

area = (diameter × 0.5)^2 × pi

Generating and Using Random Numbers

Random numbers
are, by definition, unpredictable. That is, given a series of

random numbers, you can’t predict the next number from what has come

before. Random numbers are quite useful for trying formulas and

calculations. Suppose you’re creating a worksheet to perform various kinds of data

analysis. You may not have any real data yet, but you can generate random

numbers to test the formulas and charts in the worksheet.

For example, an actuary may want to test some calculations based on a

distribution of people’s ages. Random numbers that vary between 18 and 65 can

be used for this task. You don’t have to manually enter fixed values between

18 and 65, because Excel can generate them automatically using the RAND

function.