Implementation of basic statistical tests in Python