Extending mainpage example

Can you use one of the functions in [astropy.stats](http://astropy.readthedocs.org/en/latest/stats/index.html#module-astropy.stats) here to make this example shorter and more readable?