mu = hygestat(m,k,n)
returns the mean for the hypergeometric distribution with the size of the population
m, the number of items with the intended characteristic in the
population k, and the number of items drawn n.
[mu,sigma] = hygestat(m,k,n)
also returns the variance for the distribution.
Compute the mean and variance of a hypergeometric distribution with the population size m, number of items with intended characteristics in the population k, and number of items drawn from the population n.
m = 100;
k = 5;
n = 3;
[mean,variance] = hygestat(m,k,n)
Size of the population, specified as a nonnegative integer or an array of
nonnegative integers. Each value in m must be greater than or equal
to the corresponding values in n and k. If one
or more of the input arguments m, k, and
n are arrays, then the array sizes must be the same. In this
case, hygestat expands each scalar input into a constant array
of the same size as the array inputs.
Data Types: single | double
Number of items with intended characteristics in the population, specified as a
nonnegative integer or an array of nonnegative integers. Each value in
k must be less than or equal to the corresponding value in
m. If one or more of the input arguments m,
k, and n are arrays, then the array sizes
must be the same. In this case, hygestat expands each scalar
input into a constant array of the same size as the array inputs.
Data Types: single | double
Number of items drawn from the population, specified as a nonnegative integer or an
array of nonnegative integers. Each value in n must be less than or
equal to the corresponding value in m. If one or more of the input
arguments m, k, and n are
arrays, then the array sizes must be the same. In this case,
hygestat expands each scalar input into a constant array of
the same size as the array inputs.
Mean for the hypergeometric distribution, returned as a numeric scalar or an array
of numeric scalars. mu is the same size as m,
k, and n. Each element in
mu is the mean of the hypergeometric distribution specified by
the corresponding elements in m, k, and
n. The mean of the hypergeometric distribution is
nk/m.
Variance for the hypergeometric distribution, returned as a numeric scalar or an
array of numeric scalars. sigma is the same size as
m, k, and n. Each
element in sigma is the variance of the hypergeometric distribution
specified by the corresponding elements in m,
k, and n. The variance of the hypergeometric
distribution is nk(m – k)(m – n)/[m^2(m – 1)].
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.