What Is Hypergeometric Distribution?
Hypergeometric distribution is a statistically discrete probability distribution. It describes the number of times that an object of the specified type was successfully extracted from a limited number of N objects (including M objects of the specified type) (not returned). It is called hypergeometric distribution because its form is related to the coefficient of the series expansion of the "hypergeometric function". [1]
- A type of practical problem is often encountered in product sampling inspections. It is assumed that there are M defective products in N products, that is, the failure rate.
- Randomly select n pieces from the product for inspection and find k
- Hypergeometric distribution calculation function
- function HYPGEOMDIST (kkk, n, MM, NN)
- for k = kkk to n
- AA = 1
- BBA = 1
- BBB = 1
- lll = n
- for i = 0 to k-1
- BBA = BBA * (MM-i) / (NN-i)
- next
- for j = k to n
- BBB = BBB * (NN-MM-j + k) / (NN-j)
- next
- BBs = BBB * BBA
- if lll-k> k then
- x = K
- Else x = lll-k
- end if
- for i = 1 to x
- lll = lll-1
- next
- HYPGEOMDIST = HYPGEOMDIST + BBS
- next
- end function
- response.write HYPGEOMDIST (200, 2200, 1000, 17000)
- %>