Work on stats in IPython notebook