MCPcopy Index your code
hub / github.com/clips/pattern / chi2p

Function chi2p

pattern/metrics.py:777–780  ·  view source on GitHub ↗

Returns P-value for given X2 and degrees of freedom.

(X2, df=1, tail=UPPER)

Source from the content-addressed store, hash-verified

775chi2 = chi_squared = pearson_chi_squared_test
776
777def 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

Callers

nothing calls this directly

Calls 1

gammaiFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…