chi^2 test is now working and tested.
chi_squared_test and build_distribution are now tested and working.