cancel
Showing results for
Did you mean:

# Hypergeometric Distribution Formula Greg_Deckler
Super User
293 Views Super User

## Hypergeometric Distribution Formula

The hypergeometric distribution is a probability distribution that’s very similar to the binomial distribution. In fact, the binomial distribution is a very good approximation of the hypergeometric distribution as long as you are sampling 5% or less of the population.

Therefore, in order to understand the hypergeometric distribution, you should be very familiar with the binomial distribution. Plus, you should be fairly comfortable with the combinations formula. ## Hypergeometric Distribution Formula

The (somewhat formal) definition for the hypergeometric distribution, where X is a random variable, is: This Quick Measure does the calculation above and has a bunch of error checking to boot.

```Probability =
VAR __error = IF(ISBLANK(K[K Value]) || ISBLANK('k 2'[k Value 2]) || ISBLANK(N[N Value]) || ISBLANK([n Value 2]) || [n Value 2]<'k 2'[k Value 2] || K[K Value]<'k 2'[k Value 2] || N[N Value]<'n 2'[n Value 2] || N[N Value]<K[K Value],TRUE(),FALSE())
VAR __numerator = IF(__error,1,COMBIN(K[K Value],'k 2'[k Value 2])*COMBIN(N[N Value]-K[K Value],'n 2'[n Value 2]-'k 2'[k Value 2]))
VAR __demoninator = IF(__error,1,COMBIN(N[N Value],'n 2'[n Value 2]))
RETURN