P-Introduction to Probability

Chapter 8. Law of Large Numbers

8.2 Law of Large Numbers for Continuous Random Variables

Exercise 16

Page 323

Let \(Z = X/Y\) where \(X\) and \(Y\) have normal densities with mean \(0\) and standard deviation \(1\). Then it can be shown that \(Z\) has a Cauchy density.

  1. Write a program to illustrate this result by plotting a bar graph of 1000 samples obtained by forming the ratio of two standard normal outcomes. Compare your bar graph with the graph of the Cauchy density. Depending upon which computer language you use, you may or may not need to tell the computer how to simulate a normal random variable. A method for doing this was described in Section 5.2.

  2. We have seen that the Law of Large Numbers does not apply to the Cauchy density. Simulate a large number of experiments with Cauchy density and compute the average of your results. Do these averages seem to be approaching a limit? If so can you explain why this might be?

Solution

Below is histogram of the distribution of 1,000 outcomes of \(x/y\) ratio, where \(x\) and \(y\) are both normally distributed with mean \(0\) and standard deviation \(1\).

Using R we can also display histogram of the proper Cauchy distribution.

We can see that the two histograms are very similar.

Now let us run the following simulation 2,000 times. Each run we will generate 1,000 outcomes and calculate the average. We then calculate the average between all runs up to the current one. According to the Law of Large Numbers, as number of runs increases the calculated value should approach the theoretical value. We do this for normal distribution and for the ratio.

If we plot the results of the simulated normal distribution, we can see that the value approaches \(0\).

For the Cauchy distribution, average/mean is not defined. We can see from the plot that it does indeed jump around.