4

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

Aly
  • 15,865
  • 47
  • 119
  • 191
  • 3
    Boost does: http://www.boost.org/doc/libs/1_35_0/libs/math/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/beta_dist.html – David Hope Feb 21 '13 at 16:56

2 Answers2

4

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);
Eamon Nerbonne
  • 47,023
  • 20
  • 101
  • 166
1

I'm not sure, but I believe that API of Wolfram Mathematica, MatLab or R should provide such method.

Community
  • 1
  • 1
Mihran Hovsepyan
  • 10,810
  • 14
  • 61
  • 111
  • Did not know Matlab had an API, this should do the trick! Will accept once timer lets me – Aly Feb 21 '13 at 16:59