Given N articles, B of which are annotated to a given term, the chance that .b of these articles are annotated in a test set of size .n is equal to the hypergeometric tail function.
hgt(.b, N, B, .n)
Number of annotations in target group
Total number of articles
Total number of annotations
Number of articles in target group
P value of the hypergeometric distribution.
P value is computed as in referenced article (GOrilla). Briefly, the P value is the sum from .b to the minimum of .n and B of .n choose i plus N-.n choose B - i all divided by N choose B.
Eden, E., Navon, R., Steinfeld, I., Lipson, D., & Yakhini, Z. (2009). GOrilla: a tool for discovery and visualization of enriched GO terms in ranked gene lists. BMC Bioinformatics, 10(1), 1<U+2013>7. http://doi.org/10.1186/1471-2105-10-48