In today’s Uncertainty Wednesday we are putting some of the ideas from the last few weeks together: we are looking at the behavior of the sample mean of a fat tailed distribution. To do this we will again use a bit of Python code. Unlike our first sample mean example where we looked at the roll of a die, we will need some help here to draw samples from a more complicated distribution. Thankfully the Python ecosystem has the wonderful SciPy libraries, which if you don’t know already you should check out in any case.
So here’s the code for drawing 100,000 samples of size 100 each from the Cauchy distribution.
I am rounding everything to only 1 digit to produce a histogram. And here is a chart from a run of the above program.
What is going on? There seems to be a spike around 0 which is where the distribution is centered, but there also are outcomes where the sample mean from 100 draws is greater than 25,000 and others where it is smaller than -75,000! And pretty much all the values along the way seem to have occurred also.
Let’s zoom in on the spike to see its shape better. Here are just the counts for sample means between -25 and +25:
This looks very much like a chart of the Cauchy distribution itself. Remember that when did this for the rolls of a die (a uniform distribution) we observed that the distribution of the sample mean not only looked normally distributed but that distribution became tighter as we increased the size of the sample.
Next Wednesday we will try the same here. We will look at both smaller and larger sample sizes to see what the effect is here.
Subscribe to Continuations to receive new posts directly to your inbox.
Over 100 subscribers
Collect this post as an NFT.