Hey there! Ready to crunch some numbers? Let’s dive into the world of statistics! Feel Free to reach out any time Contact Us

Hypergeometric Distribution

Hypergeometric Explorer

Sampling without replacement from a finite population.


Probability: 0.0000

Theory: Hypergeometric Distribution

The Hypergeometric distribution models the number of successes ($k$) in a sample of size $n$ drawn without replacement from a population of size $N$ containing $K$ successes. Unlike the Binomial distribution, the probability of success changes with each draw.

Probability Mass Function (PMF)
` P(X=k) = \frac{\binom{K}{k} \binom{N-K}{n-k}}{\binom{N}{n}}`

Where $\binom{n}{k}$ is the binomial coefficient.
Support: $\max(0, n+K-N) \le k \le \min(n, K)$

Moments

  • Mean: $n \frac{K}{N}$
  • Variance: $n \frac{K}{N} \frac{N-K}{N} \frac{N-n}{N-1}$
  • Mode: $\lfloor \frac{(n+1)(K+1)}{N+2} \rfloor$

Shape Parameters

  • Skewness: $\frac{(N-2K)(N-1)^{1/2}(N-2n)}{[nK(N-K)(N-n)]^{1/2}(N-2)}$
  • Excess Kurtosis: Complex function involving $N, n, K$. Generally closer to 0 as $N \to \infty$.

Comparison with Binomial

Finite Population Correction: The key difference in variance is the term $\frac{N-n}{N-1}$.

1. If $N$ is very large compared to $n$ (sample is < 5% of population), this term $\approx 1$.
2. In this case, the Hypergeometric distribution converges to the Binomial Distribution $B(n, p=K/N)$.

Python Implementation

Python (Scipy)

import scipy.stats as stats

N = 50   # Population Size
K = 10   # Total Successes in Pop
n = 5    # Sample Size
x = 2    # Observed Successes

# 1. Exact Probability P(X=x) (PMF)
prob = stats.hypergeom.pmf(x, N, K, n)
print(f"P(X={x}) = {prob:.4f}")

# 2. Cumulative Probability P(X<=x) (CDF)
cum_prob = stats.hypergeom.cdf(x, N, K, n)
print(f"P(X<={x}) = {cum_prob:.4f}")
            
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
Site is Blocked
Sorry! This site is not available in your country.
Chat with AI