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,155
  • 44
  • 113
  • 187
  • 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
  • 45,251
  • 19
  • 95
  • 164
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,450
  • 13
  • 59
  • 110
  • 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