I have forgotten

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

# CDF

Controller: CodeCogs Contents  C++
Excel

## CDF

 doubleCDF( double x double a double b double c )
This function evaluates the CDF of the Bradford distribution with given argument, defined by

and

where

In the following figure a =-10 b= 10 and the curve of the line is set by c =5
There is an error with your graph parameters for CDF with options x=-10:10 a=-10 b=10 c=5

Error Message:Function CDF failed. Ensure that: Invalid C++

### Example 1

In the example that follows, the CDF 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.
#include <codecogs/stats/dists/continuous/bradford/cdf.h>
#include <iostream>
#include <iomanip>

#define PRECISION 17

int main()
{
std::cout << "The values of the Bradford CDF 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(x, 0, 0.7, 3);
std::cout << std::endl;
}
return 0;
}

### Output

The values of the Bradford CDF 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.25728658641487911
x = 0.2 : 0.44654239804174406
x = 0.3 : 0.59632253897119802
x = 0.4 : 0.72028629569299074
x = 0.5 : 0.82603834828984657
x = 0.6 : 0.91825063385856021
x = 0.7 : 1
x = 0.8 : 1

### 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 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 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.