Input the parameters to calculate the p-value for under- or over-enrichment based on the cumulative distribution function (CDF) of the hypergeometric distribution.
Cumulative distribution function (CDF) of the hypergeometric distribution in Excel
=IF(k>=expected,1-HYPGEOM.DIST(k-1,s,M,N,TRUE),HYPGEOM.DIST(k,s,M,N,TRUE))
=IF(k>=((s*M)/N),1-HYPGEOM.DIST(k-1,s,M,N,TRUE),HYPGEOM.DIST(k,s,M,N,TRUE))
expected
= (s*M)/N
direction
=IF(k=expected,"match",IF(k<expected,"de-enriched","enriched"))
fold change
=IF(k<expected,expected/k,k/expected)
Copyright © 2009 Graeber Lab