Ph
490
3/2/2004 11:52 AM
Problem Set 4,
due Tuesday March 8, 2004
Problem 1. The goal of this problem is to carry out a
test of the Central Limit Theorem by showing that the sum of a few errors,
generated from non-Gaussian distributions, is a good approximation to a
Gaussian distribution. For the
properties of the Gaussian, refer to Bevington and
The test will be carried out using Excel to
generate and process a fairly large number of uniformly distributed random
numbers. We will make histograms of
individual random numbers and of sums of two, four, and nine random numbers. The histogram of the sum of nine random
numbers will be tested to see if it has become a good approximation to a
Gaussian. (Note that adding random
numbers is a way of simulating a "random walk.")
(a) Start by opening an Excel spreadsheet. In cell B11, enter
rand()-0.5
This
generates a random number between -0.5 and 0.5, whose average value is 0. Drag this formula over to cell J11 and down
to cell 1010. Label columns B through J
as N1 through N9. These represent nine different samples of 1000 random numbers.
Now in cell enter
in cell K11: =sum(B11:C11)/sqrt(2)
in cell L11: =sum(B11E11)/sqrt(4)
in cell M11: =sum(B11:J11)/sqrt(9)
and
drag these three columns all the way down.
These three columns represent sums of 2, 4, and 9 numbers. Label them S2, S4, and S9.
Next, go to sheet 2 and make some histograms. First enter the numbers -1.,
-.9, -.8, . . . .9, 1. in cells B11 to B31. These are the limits for the bins of the
histograms. Now make histograms of N1,
S2, S4, and S9, as follows. Click on Tools, Data Analysis, and Histogram. [If Data Analysis is not there, go to Tools,
Add Ins, and add in the Analysis Toolpack.] In the Histogram dialogue box, enter the
following information:
Data: sheet1!B11:B1010
check Chart
Output
Then
click OK. You should get a histogram of
numbers running from -.5 to .5, with a flat distribution.
Next repeat for:
S2:
data in K11-K1010, output in E10
S4:
data in K11-L1010, output in G10
S9:
data in M11-M1010, output in I10
(b) Visually evaluate whether this series seems to
be converging to a Gaussian.
(c) Make a numerical test of the Gaussian
approximation for the four distributions by calculating the average value and
standard deviation of the mean (Average and Stdev,
for Excel), and then seeing if the expected number of entries lies outside of
the interval
[-s,s].