mhyper: Mean and Variance of the Hypergeometric Distribution

View source: R/moments.R

mhyperR Documentation

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)

Arguments

m

Number of successes in the population

n

Number of failures in the population

k

Sample size

Value

List with mean and variance

See Also

dhyper

Examples

mhyper(m = 20, n = 30, k = 10)

DescTools documentation built on April 4, 2025, 1:55 a.m.