Skip to content
Snippets Groups Projects
Commit df19fccb authored by Frank Sauerburger's avatar Frank Sauerburger
Browse files

Update degrees of freedom in printout

Change the degrees of freedom in the printout from 122 to 123. Additionally,
change the phrase 'ndf' (number of degrees of freedom) to 'dof' (degrees of
freedom) to be more consistent.
parent e72d4cb3
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -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
```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment