Some function for basic statistical analysis with python