Excel Function : HYPGEOM.DIST
Category
Statistical
Description
Returns the hypergeometric distribution
Microsoft Excel Reference Page
https://support.office.com/en-us/article/HYPGEOMDIST-function-6dbd547f-1d12-4b1f-8ae5-b0d9e3d22fbf
Syntax and Description of the HYPGEOM.DIST Excel Function
in python
I have a excel function HYPGEOM.DIST(sample_s, number_sample, population_s, number_population, False)
which I am trying to get in python. Sample_s, number_sample, population_s, number_population are variables.
I am trying to get the same output with this python code:
from scipy import stats
z = stats.hypergeom(population_s, number_population, number_sample)
print(z.sf(sample_s - 1))
but I am not getting the same output.
A:
I don't think
About HYPGEOM.DIST Excel Function
The HYPGEOM.DIST function returns the hypergeometric distribution. For example, if you have a deck of cards and draw five cards, the function can calculate the probability of drawing exactly two hearts.