50% off: Unlimited data and AI learning.
The Learning Leader's Guide to AI Literacy

DescTools (version 0.99.60)

mhyper: Mean and Variance of the Hypergeometric Distribution

Description

Formula: \(\mu = k \cdot \frac{m}{m + n}\) \(\mathrm{Var}(X) = k \cdot \frac{m}{m + n} \cdot \frac{n}{m + n} \cdot \frac{m + n - k}{m + n - 1}\)

Usage

mhyper(m, n, k)

Value

List with mean and variance

Arguments

m

Number of successes in the population

n

Number of failures in the population

k

Sample size

See Also

Examples

Run this code
mhyper(m = 20, n = 30, k = 10)

Run the code above in your browser using DataLab