Returns P-value for given X2 and degrees of freedom.
(X2, df=1, tail=UPPER)
| 775 | chi2 = chi_squared = pearson_chi_squared_test |
| 776 | |
| 777 | def chi2p(X2, df=1, tail=UPPER): |
| 778 | """ Returns P-value for given X2 and degrees of freedom. |
| 779 | """ |
| 780 | return gammai(df * 0.5, X2 * 0.5, tail) |
| 781 | |
| 782 | #o, e = [[44,56]], [[50,50]] |
| 783 | #assert round(chi_squared(o, e)[0], 4) == 1.4400 |
nothing calls this directly
no test coverage detected
searching dependent graphs…