rewrote statistics
lot of fixes in math
I forgot this
Merge pull request #116 from huggle/statistics

Statistics