Create stat_functions.py