FUNCTION
CDF_inv
Evaluates the inverse of the hypergeometric cumulative density function.
You're viewing an older version of this page (#5446). View the current version.
Interface
#include <codecogs/statistics/distributions/discrete/hypergeometric/cdf_inv.h>
using namespace Statistics::Distributions::Discrete::Hypergeometric;
This function evaluates the inverse of the hypergeometric cumulative density function.
\graph p=0:1:20 a=2 b=3 n=2:5:2
Example 1
#include <iostream>
#include <codecogs/statistics/distributions/discrete/hypergeometric/cdf_inv.h>
int main()
{
std::cout << "hypergeometric CDF inverse (0.9, 2, 3, 2) = ";
std::cout << Statistics::Distributions::Discrete::Hypergeometric::CDF_inv(0.9, 2, 3, 2) << std::endl;
return 0;
}Output:
hypergeometric CDF inverse (0.9, 2, 3, 2) = 1Parameters
p
the target cumulative probability, 0 <= p <= 1
a
the number of type-A items in the population
b
the number of type-B items in the population
n
the sample size (number of items drawn from the population, without replacement)
Returns
the smallest x such that P(X <= x) >= p, where X follows the hypergeometric distribution
Interactive Calculator
p
a
b
n
Result
Computing…
Set a range above first to export a graph.
This function's source code is only visible to registered users — documentation and the calculator above are free to use either way. Sign in to see it.