How is the hypergeometric distribution used to test for enrichment?

How is the hypergeometric distribution used to test for enrichment?

Here, we show the use of the hyper-geometric distribution to test for enrichment of a (biologically relevant) category (e.g., a pathway) in a differential gene expression signature. We will show the use of the functions phyper and fisher.test.

Which is an example of a hypergeometric collection?

Such a set X is called the dichotomous collection. Among the examples of dichotomous collection are a set of white and black balls, a group of men and women, a group of right- and left-handed people, etc. The experiment leading to the hypergeometric distribution consists in random choice of n different elements out of dichotomous collection X.

How to test for enrichment in a single signature?

We first test for enrichment of a single geneset in a single signature using the function phyper (the cumulative function of the hyper-geometric distribution). The background population is set to 23,467, which represents the number of annotated genes in the dataset used to derive the differential signature.

How is a random variable distributed according to the hypergeometric distribution?

A random variable X is distributed according to the hypergeometric distribution if for k ≤ m, the probability Pr ( X = x) is given by ( 2.3) [ 22 ]. For n ≥ 2, the mathematical expectation and the variance are given by: (2.5)Var[X]=mr(n − r) (n − m) n2(n−1).

How to calculate hypergeometric and Fisher’s exact test?

R software provids function phyper and fisher.test for Hypergeometric and Fisher’s exact test accordingly. However, it is tricky to get it right. I spent some time to make it clear. x = the number of diamonds selected. We ‘re asking if diamond enriched or depleted in our selected cards, comparing to the background.

What is one tailed hypergeoemtric p-value for?

To examine whether this algorithm is really behaves highly selective or just selects by chance, I intend to calculate one-tailed hypergeoemtric p-value, as follows: Since other similar studies report upper cumulative Q, I am also focusing on that.