diff --git a/README.md b/README.md index 9df20fa5079069968bf70aec8e33b8fad8a506f8..aec0e1ca26b3a8e00ce5c9bf4baf6f471d975d92 100644 --- a/README.md +++ b/README.md @@ -556,7 +556,7 @@ print("chi^2 from scipy:") # Call chisquare and print. chi2, p = scipy.stats.chisquare(count, fit_count, ddof=dof) -print(" chi2 / ndf = %g / %d" % (chi2, len(count) - dof)) +print(" chi2 / dof = %g / %d" % (chi2, len(count) - dof)) print(" p-value = %g" % p) print() # print blank line @@ -569,7 +569,7 @@ chi2 = ((count - fit_count)**2 / uncertainty**2).sum() # Calculate p-value and print p = scipy.stats.distributions.chi2.sf(chi2, len(count) - 1 - dof) -print(" chi2 / ndf = %g / %d" % (chi2, len(count) - dof)) +print(" chi2 / dof = %g / %d" % (chi2, len(count) - dof)) print(" p-value = %g" % p) ``` @@ -586,11 +586,11 @@ Optimal parameters: b = 0.841156 +- 0.0193703 chi^2 from scipy: - chi2 / ndf = 120.577 / 122 + chi2 / dof = 120.577 / 123 p-value = 0.519418 Manual chi^2 test: - chi2 / ndf = 120.577 / 122 + chi2 / dof = 120.577 / 123 p-value = 0.519418 ```