Example: Geometric and Hypergeometric Distribution Functions
Geometric Distribution
1. Use the
dgeom function to calculate the probability density for value
k:
2. Use the
pgeom function to calculate the cumulative probability distribution for value
k:
3. Use the pgeom function to calculate the inverse cumulative probability distribution for probability p:
4. Use the
rgeom function to create a vector of
m random numbers having the geometric distribution:
Recalculating the worksheet causes function rgeom to return a new set of random numbers.
Hypergeometric Distribution
1. Define the input parameters a, b, m and n. The parameters are integers satisfying the relationship:
max{0, n − b} ≤ m ≤ min{n, a}, and 0 for m elsewhere.
2. Use the
dhypergeom function to calculate the probability density for the hypergeometric distribution:
3. Use the
phypergeom function to calculate the cumulative probability distribution:
4. Use the
qhypergeom function to calculate the inverse cumulative probability distribution for probability
p:
5. Use the
rhypergeom function to create a vector of m random numbers having the hypergeometric distribution:
Recalculating the worksheet causes the rhypergeom function to return a new set of random numbers.