Or login with:
| doubleCDF_inv( | double | y | |
| double | alpha | ||
| double | beta | )[inline] |
CDF( x, alpha, beta ) = yThe routine performs interval halving or Newton iterations to find the root of
#include <codecogs/stats/dists/continuous/beta/cdf_inv.h> #include <iostream> #include <iomanip> #define PRECISION 17 int main() { std::cout << "The values of the Beta CDF inverse with alpha = beta = 0.5"; std::cout << std::endl; std::cout << "x = {0, 0.1, 0.2, ... , 0.7, 0.8} are" << std::endl; std::cout << std::endl; for (double x = 0; x < 0.81; x += 0.1) { std::cout << std::setprecision(1); std::cout << "x = " << std::setw(3) << x << " : "; std::cout << std::setprecision(PRECISION); std::cout << Stats::Dists::Continuous::Beta::CDF_inv(x, 0.5, 0.5); std::cout << std::endl; } return 0; }Output
The values of the Beta CDF inverse with alpha = beta = 0.5 x = {0, 0.1, 0.2, ... , 0.7, 0.8} are x = 0 : 0 x = 0.1 : 0.024471741852423217 x = 0.2 : 0.095491502812526302 x = 0.3 : 0.20610737385376349 x = 0.4 : 0.34549150281252633 x = 0.5 : 0.5 x = 0.6 : 0.65450849718747373 x = 0.7 : 0.79389262614623646 x = 0.8 : 0.90450849718747361
| y | solution we're seeking for betaCDF |
| alpha | first attribute |
| beta | second attribute |
Source code is available when you buy a Commercial licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.
You must login to leave a messge