Added chi2 calculation functions
Two tests provided