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

Function p

pattern/metrics.py:688–689  ·  view source on GitHub ↗
(a, b, c, d)

Source from the content-addressed store, hash-verified

686 # Hypergeometric distribution.
687 # (a+b)!(c+d)!(a+c)!(b+d)! / a!b!c!d!n! for n=a+b+c+d
688 def p(a, b, c, d):
689 return C(a + b, a) * C(c + d, c) / C(a + b + c + d, a + c)
690 # Binomial coefficient.
691 # n! / k!(n-k)! for 0 <= k <= n
692 def C(n, k):

Callers 2

fisher_exact_testFunction · 0.85
tablesMethod · 0.85

Calls 1

CFunction · 0.85

Tested by

no test coverage detected