# Questions tagged [hypergeometric-distribution]

A discrete distribution used to model sampling without replacement.

75 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
314 views

### How to construct confidence limits based on small stratified samples of finite populations?

Imagine a business wishes to audit its transactions. It has a database summarizing the transactions, which constitute a sampling frame for the population. It would be time-consuming and expensive to ...
• 309k
641 views

### Hypergeometric: how do I construct a credibility interval around K (population successes) in R?

I have a problem for which I believe I should use the hypergeometric distribution, but I can't figure out how to do it in R. Say I have a bag of marbles with known number ($N$) of marbles, but the ...
• 191
807 views

### Using the hypergeometric distribution for skipping events in transcriptome sequencing

My question is inspired by this post. However, its a bit more complicated than that to explain. I hope I succeed. I work with RNA-Seq data on alternative splicing in plants. For this discussion, lets ...
• 834
28 views

### How many orders will be placed on average until stock runs out, given a probability that the customer will find the item they want?

Let there be 500 units of stock $s$ of diverse items in a store. Customers arrive one by one and, for every given item, there is a likelihood $m$ of 5% that it is precisely the item that the customer ...
91 views

### What is the estimate of $\mathrm{Var}\left(\frac{nM}{X}\right)$ where $X$ is hypergeometric?

Consider the classical capture-recapture method, where we are to estimate the number of deer (say) in a sanctuary. So a certain number of deer is captured, tagged and released. Then a random sample is ...
• 10.3k
335 views

### want to calculate significance of pairwise sharing between lists. Standard hypergeometric test seems inappropriate

I want to calculate if the percentage of sharing of strings (genes in this case) between lists is significantly more than expected by chance for multiple pairwise comparisons between lists of strings. ...
• 249
588 views

### Combination of Z-scores and hypergeometric distribution?

I am trying to apply an analysis I've seen in a publication to our data, but I ran into problems when it came down to the specifics. The publication is open-access an can be found here for reference. ...
• 141
75 views

### Test of strict difference in independent binomial probabilities

Suppose $X,Y$ are two independent binomial random variables with parameters $n_1,p_1$ and $n_2,p_2$ respectively. Suppose one wanted to test the hypothesis $p_1>p_2$. Conditional on $X+Y=s$, ...
345 views

### Can I use Bayes Theorem to find a conditional distribution rather than conditional probability?

I might be going about this the wrong way, but I'm trying to develop an understanding of a particular conditional value, say $P(CustomerBuysFries | CustomerBuysHamburger) = P(F|H)$. Ultimately, I want ...
89 views

### Characterize this discrete distribution

Suppose we have $k$ buckets, with an infinite number of balls in each bucket. The balls within one bucket are indistinguishable, those between buckets are. We assign to bucket $i$ a probability $p_i$ (...
• 852
123 views

### Is there an efficient algorithm for sampling from the negative hypergeometric distribution?

I'm writing a small statistics library currently. One of the algorithms I'm implementing has two variants: one that samples the hypergeometric distribution and one that samples the negative ...
• 203
1k views

• 21
63 views

### Combined hypergeometric distribution of exclusive sets

Given the following: a set of numbers, 1 to 20 four sets of five numbers from the set above (each number used once) a draw of five different numbers from the first set How would I determine the ...
• 121
1 vote
52 views

### Drawing 0 green balls from an Urn with non-uniform probabilities

An urn contains $N_1$ red balls and $N_2$ green balls. Each ball has an associated weight. Each ball is drawn (without replacement) with a probability proportional to how much its weight contributes ...
• 316
1 vote
15 views

### What distribution does a ratio of successes to failures (with replacement) follow?

Suppose you realize $n$ draws—with no replacement—from a sample of $N$ marbles, in which I know there are $K$ white marbles and $N - K$ black marbles. The probability of getting $k \leq n$ white ...
1 vote
26 views

### Sampling identical sequences from two urns with unique colored balls

In very simple terms, my problem is as follows: given two urns, both with N balls where each ball has a unique color, I am interested in sampling sequences of N balls without replacement from each urn....
• 111
1 vote
19 views

### Game design urn problem

I am designing a tabletop game and trying to conceptualise the probabilities involved. These can be expressed as an urn problem: Our urn contains seven counters, either green or red. We draw five and ...
• 11
1 vote
98 views

### Hypergeometric distribution with no number of defect items information

So I am looking at the problem here: A hospital has received a shipment of 25 new X-ray machines. The hospital could lose its license for housing X-ray machines if the machines are not properly ...
• 11
1 vote
62 views

### Exercise on MLE with hypergeometric distribution

I am struggling with the following exercise from Stapleton's book (it's exercise 7.4.1). A box contains eight eggs, of which an unknown number $R$ are rotten. You take a simple random sample of three ...
• 111
1 vote
31 views

### Using hypergeometric test for presence/absence of different conditions

My dataset consists of 3 conditions, with different numbers of samples in each condition (30 in condition 1, 80 in condition 2, 50 in condition 3). I have measured the presence or absence of a gene in ...
• 11
1 vote
68 views

### What is the probability of 5 anomalies appearing in a batch of 100, from a data set of 1000 examples and 10 anomalies?

I am trying to work out the expected value of the following example: A data set contains 1000 examples in total. 10 examples can be considered anomalous. I am randomly drawing 100 examples to form a ...
1 vote
18 views

### why is the margin (total number of sample) important when deciding between hypergeometric and Fisher's exact test

My impression is that both of hypergeometric and Fisher's exact test are similar in calculating the significance of contingency table. The main difference is whether or not you know the margin (if you ...
• 839
1 vote
157 views

### Different formulas for two-sided mid $p$-value ($2\times2$ table setting)

I'm interested in testing independence of two binary variables in a $2\times 2$ table: i.e. $H_0: \theta=1$ against the two-sided alternative $H_1:\theta\neq 1$, where $\theta$ is the odds-ratio. ...
• 691
1 vote
66 views

### Devising an acceptance sampling plan for False Negative Rate

I need to evaluate a binary classifier that classifies inputs in positives and negatives. Since all predicted positives (PP) are assessed, I have complete data on the true positives (TP) and the false ...
• 207
1 vote
486 views

### Quantile (Inverse Cumulative Density) Function for Hypergeometric Distribution

The hypergeometric distribution arises from sampling without replacement. The similar binomial sampling distribution assumes replacement. Hypergeometric distributions are commonly used in quality ...
1 vote
81 views

### Variance of a hypergeometric distribution

I'm trying to answer the following question from Ross's book: A pond contains 100 fish, of which 30 are carp. If 20 fish are caught, what are the mean and variance of the number of carp among the 20? ...
• 145
1 vote
285 views

### Multivariate hypergeometric distribution: Multiple bins

My question concerns a variant of the classic urn problem for the case of more than 2 types (colours). Given a single urn with $N$ balls of 3 distinct colours (say, red ($R$), green (G) and blue ($B$...
• 1,413
1 vote
330 views

### Hypergeometric testing

I have a large container with 21505 toys, **14,038 action figures (5,397 brands)** and 7,467 barbies (1 brand). Sample: ...
1 vote
363 views

### 2x2 contigency table hyper-geometric test

I'm having trouble using the hyper-geometric test on a 2x2 contingency table. I have listed the null hypothesis below. Assuming the null hypothesis is: $$P = \frac{A}{A+B} = \frac{C}{C+D}$$ From here,...
• 1,782
1 vote
4k views

### Hypergeometric test for enrichment analysis?

I am referring to a previously asked question on my case for gene enrichment analysis using hypergeometric distribution. Here is my modified question (many thanks to @Glen_b): I have a mixture of ...
• 23
1 vote
627 views

### Fisher's exact test for multidimensional contingency tables

I have a dataset that has 6000 instances, each with 8 boolean values. ...
• 777
1 vote
26 views