Create Stats.py

Moved statistical functions to Stats.py