a playful generator of the normal distribution

thanks to Annie Spratt

In my previous (1) and (2) posts I presented some different animated visualizations showing how the normal distribution arises from a recursive or iterative process interpreting the Central Limit Theorem.

But this not the only way to arrive at the normal distribution. In this post I’m going to speak about the derivation that I like the most and that inspired me another simple, interactive application.

Imagine that you have to hit a target. You aim at its center but since you aren’t a crack shot your throws will departure to some extent from it.

If you suppose that:

  1. deviates from the center become less likely moving away from it
  2. deviates from the center along one direction (for example, horizontally) don’t condition ones along the perpendicular direction (vertically)

then the orthogonal projection of shots on a whatever pair of perpendicular axes (again, for example, left-right and up-down) has the normal distribution.

Let us explain visually this model.

The first assumption is simple to describe. In the figure below, A and B are at the same distance from the center and they both are closer than C which in turn is closer than D. Then shots A and B are more likely than shot B and the latter is more likely than shot D.

The second assumption is more awkward. It means that knowing how much the center has been missed left or right doesn’t provide any information on how much it has been missed up or down. In other words, if you imagine to know the positions of whatever two shots along the horizontal and vertical axes, separately, then, with reference to the figures below, you are unable to decide if the two shots are A and C or B and D.

Finally, the figure below shows how, according to only these two assumptions, the shots are distributed along whatever two perpendicular axes.

You can read a simple proof of such derivation on stackexchange, where it is said that, with slightly different words, it dates back to Hersch in around 1800.

I confess that I’ve often wondered about how a pair of mild conditions is sufficient to deduce the normal distribution. Anyway, at some point I have thought: why not prove it empirically?

For this purpose, I started to build a digital version of the darts game that, after a slow gestation, I just finished.

The player has one minute to hit the target as close as possible to its center forty times, and after that the one-dimensional distribution of the shot is displayed.

The game uses some tricks to make the model credible:

  • the target appears and disappears seamlessy on the screen at random positions, and each time the player only has a split second to aim and hit, so to make a perfect shot very difficult;
  • each shot increases the game score according to its distance from the center of the target, so to encourage the player competitive spirit and take the game seriously;
  • the target spins around endlessly, so to make some departure from the two model assumptions less affecting its validity

I overlook some technical details about the variance of the shots (that is, their mean square distance from the target center) and its estimation. Suffice it to say, it must be assumed that the player skill doesn’t change during the one minute game time.

Now, it’s your turn. Without leaving this page, here below you can play the game yourself and check the model validity for your aim style and behaviour evaluating how much the distribution of your shot projections resembles the normal one. If you prefer to carry on in full screen mode or on your mobile, you can do on github. If you only want to watch a demostration, you can play the video on youtube.

Enjoy yourself.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.