# 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 ...
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 ...
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 ...
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 ...
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. ...
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. ...
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$ (...
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 ...
1k views

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 ...
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 ...
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....
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 ...
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 ...
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 ...
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 ...
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 ...
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. ...
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 ...
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? ...
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 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 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 ...
1 vote
Let $(Y_i, K_i)$, $i=1,\dotsc,N$ be pairs of observations drawn from discrete labels $L$ and discrete clusters IDs $C$. For example $Y$ could be individual birds, $L$ could be a set of species and $... 1 vote 0 answers 165 views ### Binomial modelling, testing and Bonferroni I am currently trying to validate an implementation that is supposed to randomly assign a certain number of tags to users who enter a platform. The variable of interest here for me is the sum of all ... 1 vote 0 answers 1k views ### Sampling from hypergeometric distribution Suppose there are 1 million balls in the urn. And 1% of those are red, the rest are black. I sample 1000 balls from the urn, and I want to know what's the cumulative probability of getting at least 10 ... 1 vote 0 answers 52 views ### Hypergeometric problem - balls of two colors drawn from box There are 55 balls in the box, of which are 25 red and the rest is black. We draw randomly 8 balls from the box. What is the probability that among the selected balls will be a) exactly 2 black balls, ... 1 vote 0 answers 60 views ### Hypergeometric dist. with three balls We have 13 black balls, 3 red balls and 16 white balls. We want to calculate the probability for getting 16 balls where we want only the white and red balls i.e. zero black balls. We draw without ... 1 vote 0 answers 561 views ### Non-integer Arguments for R's phyper Function In the code below, why does phyper return a result for non-integer arguments? I would expect it to complain bitterly in the same fashion dhyper did. ... 1 vote 0 answers 63 views ### Incorporating uncertainty in hypergeometric probability test Wikipedia's page on determining the hypergeometric probability describes the variables in the following way: N is the population size, K is the number of success states in the population, n ... 1 vote 0 answers 40 views ### Test statistic and C.I. for population proportion I'm doing a test statistic and C.I. for population proportion. Can someone explain to me what are assumptions coming from hypergeometrical distribution directly to normal distribution? As I understand,... 1 vote 0 answers 2k views ### Multivariate Hypergeometric Distribution with "or more" Successes I understand how to calculate multivariate hypergeometric distributions. For example, if you have an urn with 2 red marbles, 4 white marbles, 8 blue marbles, and 12 orange marbles, the probability of ... 0 votes 0 answers 17 views ### Test to find expected outcome I have a list of genes and I tested if these genes are associated with a disease by using the genome-wide association summary statistics dataset. Chi-square statistics was used and after performing ... 0 votes 0 answers 61 views ### multivariate hypergeometric test in R I have 10 multiple choice questions, each question has 4 answers and all answers are same for each question. Lets say choice D is the correct answer for all questions, but 35% of the answers were ... 0 votes 0 answers 13 views ### Likelihood of all hypergeometric parameters conditional on all others How to derive the likelihood function of other parameters of the hypergeometric distribution conditional on the others? Why is the$L(N|y)$equivalent to$P(Y=y)\$? I mean This seems too evident. I'm ... 