I have forgotten

• https://me.yahoo.com
COST (GBP)
0.20
0.00
0

PDF

Controller: CodeCogs
Contents

C++
HTML

PDF

 doublePDF( double x double a double b double c )[inline]
This function evaluates the PDF of the Bradford distribution with given argument, defined by

and

where

In the example that follows, the PDF is evaluated using values from 0 up to 0.8 with a step equal to 0.1, while the parameters have fixed values 0, 0.7 and 2.5 correspondingly. The maximum number of precision digits, implicitly set to 17, may be changed through the <em> PRECISION </em> define.

Example 1

#include <codecogs/statistics/distributions/continuous/bradford/pdf.h>
#include <iostream>
#include <iomanip>

#define PRECISION 17

int main()
{
std::cout << "The values of the Bradford PDF with " << std::endl;
std::cout << "a = 0, b = 0.7, c = 2.5 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::PDF(x, 0, 0.7, 2.5);
std::cout << std::endl;
}
return 0;
}

Output

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

x =   0 : 0
x = 0.1 : 2.1006200003892843
x = 0.2 : 1.6629908336415169
x = 0.3 : 1.3762682761171172
x = 0.4 : 1.1738758825704825
x = 0.5 : 1.0233789745486259
x = 0.6 : 0.90708590925900912
x = 0.7 : 0.81452612259992652
x = 0.8 : 0

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