Search code examples
c++mathg++librariesbeta-distribution

Any libraries that provide betainv for C++


Does anyone know of any libraries that provide the betainv function in c++?

The betainv(x,a,b) computes the xth quantile of a beta distribution with parameters a,b


Solution

  • The Boost C++ Libraries have a beta distribution, and all boost distributions include the inverse cumulative density function: Quantile.

    e.g.

    double probability=...;
    beta_distribution<> mybeta(2, 5);
    cout << quantile(mybeta, probability);