Fix errors and typos in the docstring of chi-squared