Hypergeometric { public Hypergeometric() { lfactorial = new Vector<>(); lfactorial.add(0, 0.0); lfactorial.add(1, 0.0); } Hypergeometric(); double phypergeometric(int n, double p, int k, int r); double phypergeometric(int m, int m_t, int n, int n_t); double dhyper(int x, int N, int M, int n); double phyper(int x, int N, int M, int n, boolean lowerTail); double lNchooseK(int n, int k); double logfact(int i);  }
@Test void testHypergeometric() { int pop=324; int m_t=82; int study=74; int studyAnnot=38; double raw_pval = hypergeometric.phypergeometric(pop, m_t, study, studyAnnot); double expected = 2.253392e-08; assertEquals(expected, raw_pval, EPSILON); }