I have forgotten

• https://me.yahoo.com
COST (GBP)
1.50
8.24
0

# CDF

Evaluates the Gamma distribution CDF.
Controller: CodeCogs
Contents

C++
HTML

## CDF

 doubleCDF( double a double b double x bool upper = false )
This function evaluates the Gamma distribution CDF.

## Example:

#include <stdio.h>
#include <codecogs/statistics/distributions/continuous/gamma/cdf.h>
using namespace Stats::Dists::Continuous::Gamma;
int main()
{
double a[10] = { 2.8, 2.6, 0.2, 0.5, 1.8, 1.0, 2.9, 1.3, 0.4, 1.7 };
double b[10] = { 1.6, 0.4, 0.2, 2.0, 2.1, 0.5, 2.1, 0.2, 0.2, 2.1 };
double x[10] = { 1.9, 2.5, 4.7, 2.0, 0.7, 1.7, 1.6, 2.5, 1.5, 2.7 };
for( int i=0; i<10; i++ )
printf( "CDF( %1.1f, %1.1f, %1.1f, true ) = %f \n",
a[i], b[i], x[i], CDF(a[i],b[i],x[i]), true );
return getchar();
}

## Output:

CDF( 2.8, 1.6, 1.9, true ) = 0.983491
CDF( 2.6, 0.4, 2.5, true ) = 0.999796
CDF( 0.2, 0.2, 4.7, true ) = 0.942540
CDF( 0.5, 2.0, 2.0, true ) = 0.264241
CDF( 1.8, 2.1, 0.7, true ) = 0.329227
CDF( 1.0, 0.5, 1.7, true ) = 0.934804
CDF( 2.9, 2.1, 1.6, true ) = 0.938022
CDF( 1.3, 0.2, 2.5, true ) = 0.997263
CDF( 0.4, 0.2, 1.5, true ) = 0.899123
CDF( 1.7, 2.1, 2.7, true ) = 0.935477

## Accuracy:

### Parameters

 a the gamma shape parameter b the gamma shape parameter x the value at which to evaluate the distribution, must not be negative upper Default value = false

### Authors

Stephen L. Moshier (June 2000)
Updated by Vince Cole and Eduard-Mihai Bentea
##### 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.