CDF inv
Evaluates the inverse of the Beta CDF.
Controller: CodeCogs
Contents
Dependents
Interface
C++
CDF Inv
doubleCDF_inv( | double | y | |
double | alpha | ||
double | beta | )[inline] |
There is an error with your graph parameters for CDF_inv with options alpha=0.5 beta=0.5 y=0:1
Given y, this function finds x such that
Error Message:Function CDF_inv failed. Ensure that: Invalid C++
CDF( x, alpha, beta ) = yThe routine performs interval halving or Newton iterations to find the root of
References:
Cephes Math Library Release 2.8: June, 2000Example 1
#include <codecogs/statistics/distributions/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; }
OutputThe 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
Parameters
y solution we're seeking for betaCDF alpha first attribute beta second attribute
Returns
- the inverse CDF of the Beta distribution
Authors
- Lucian Bentea (August 2005)
Source Code
Source code is available when you buy a Commercial licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.