Enhancing Statistic (types) and moving it to math

Fixes #533