PA: Bootstrapping

The Cauchy Distribution

The Cauchy distribution is a continuous distribution with possible values from negative infinity to infinity. It is an unusual distribution, because it does not have a mean! It does, however, have a median. We will use simulation and bootstrapping to explore this.

Instructions

Perform the following steps:

  1. Simulate a sample of size 100 from the standard Cauchy distribution. (Hint: Remember the p, q, r, d functions for simulation!)

  2. Take 1000 bootstrap samples from your simulated sample. Make a 95% confidence interval for (a) the mean and (b) the median.

  3. Repeat (1) and (2) ten times. That is, you should have a NEW simulated Cauchy sample each time, from which you then resample many times to create a confidence interval. Save the upper and lower bounds of the mean and median confidence intervals at each step.

  4. Make a plot showing the 10 mean confidence intervals, and another plot showing the 10 median confidence intervals. (It is your choice what kind of plot to use!)

If these steps were done correctly, you should notice that the median confidence intervals were roughly the same at each step, while the mean confidence intervals were all over the place!

It might look a bit like this: