mean
Evaluates the mean of the Bradford distribution PDF.
Controller: CodeCogs
Contents
Interface
C++
Mean
doublemean( | double | a | |
double | b | ||
double | c | )[inline] |
Example 1
#include <codecogs/statistics/distributions/continuous/bradford/mean.h> #include <iostream> #include <iomanip> #define PRECISION 17 int main() { std::cout << "The mean of the Bradford distribution PDF with"; std::cout << std::endl << "a = 0, b = 1 and " << std::endl; std::cout << "c = {0.1, 0.2, ... , 0.7, 0.8} is" << std::endl; std::cout << std::endl; for (double c = 0.1; c < 0.81; c += 0.1) { std::cout << std::setprecision(1); std::cout << "c = " << std::setw(3) << c << " : "; std::cout << std::setprecision(PRECISION); std::cout << Stats::Dists::Continuous::Bradford::mean(0.0, 1.0, c); std::cout << std::endl; } return 0; }
Output
The mean of the Bradford distribution PDF with a = 0, b = 1 and c = {0.1, 0.2, ... , 0.7, 0.8} is c = 0.1 : 0.49205868725706231 c = 0.2 : 0.48481494774707845 c = 0.3 : 0.4781613533750686 c = 0.4 : 0.47201341198846192 c = 0.5 : 0.46630346237643167 c = 0.6 : 0.46097647856777624 c = 0.7 : 0.45598710746256077 c = 0.8 : 0.45129752801813683
References
- John Burkardt's library of statistical C++ routines, http://www.csit.fsu.edu/~burkardt/cpp_src/prob/prob.html
Parameters
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 mean of the Bradford distribution PDF
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.