Forgotten Password?

Or login with:

• http://facebook.com/
• https://www.google.com/accounts/o8/id
• https://me.yahoo.com
COST (GBP)
0.20
0.00
0

# CDF inv

Evaluates the Bradford distribution CDF inverse.
Contents

C++
Excel

## CDF Inv

 doubleCDF_inv( double x double a double b double c )[inline]
This function evaluates the CDF inverse of the Bradford distribution with given arguments, defined by

$D^{-1}(x,&space;a,&space;b,&space;c)&space;=&space;a&space;+&space;\frac{b&space;-&space;a}{c}&space;\left(&space;(c&space;+&space;1)^x&space;-&space;1&space;\right)&space;\qquad&space;\mbox{for&space;}&space;0&space;<&space;x&space;<&space;1$

and

$D^{-1}(x,&space;a,&space;b,&space;c)&space;=&space;a&space;\quad&space;\mbox{for&space;}&space;x&space;=&space;0&space;\qquad&space;D^{-1}(x,&space;a,&space;b,&space;c)&space;=&space;b&space;\quad&space;\mbox{for&space;}&space;x&space;=&space;1$

where

$a&space;<&space;b&space;\quad&space;and&space;\quad&space;c&space;>&space;0$

In the example that follows, the CDF inverse is evaluated using values from 0 up to 0.8 with a step equal to 0.1. The maximum number of precision digits, implicitly set to 17, may be changed through the <em> PRECISION </em> define.

### Example 1

#include <codecogs/stats/dists/continuous/bradford/cdf_inv.h>
#include <iostream>
#include <iomanip>

#define PRECISION 17

int main()
{
std::cout << "The values of the Bradford CDF inverse with " << std::endl;
std::cout << "a = 0, b = 0.7, c = 3 and" << std::endl;
std::cout << "x = {0, 0.1, 0.2, ... , 0.8} are" << std::endl;
std::cout << std::endl;
std::cout << std::setprecision(10);
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::Bradford::CDF_inv(x, 0, 0.7, 3);
std::cout << std::endl;
}
return 0;
}

### Output

The values of the Bradford CDF inverse with
a = 0, b = 0.7, c = 3 and
x = {0, 0.1, 0.2, ... , 0.8} are

x =   0 : 0
x = 0.1 : 0.03469628283264152
x = 0.2 : 0.074551845847008649
x = 0.3 : 0.12033386551909291
x = 0.4 : 0.17292359620485789
x = 0.5 : 0.23333333333333331
x = 0.6 : 0.30272589899861624
x = 0.7 : 0.38243702502735061
x = 0.8 : 0.47400106437151907

### References

John Burkardt's library of statistical C++ routines, http://www.csit.fsu.edu/~burkardt/cpp_src/prob/prob.html

### Parameters

 x the argument of the CDF inverse (in the interval from 0 to 1, including endpoints) a the first parameter of the distribution (strictly less than b) b the second parameter of the distribution c the third parameter of the distribution (strictly positive)

### Returns

the inverse CDF of the Bradford distribution

### Authors

Lucian Bentea (September 2005)
##### Source Code

Source code is available when you agree to a GP Licence or buy a Commercial Licence.

Not a member, then Register with CodeCogs. Already a Member, then Login.