FUNCTION
CDF
Evaluates the Gamma distribution CDF.
You're viewing an older version of this page (#181). View the current version.
Interface
#include <codecogs/statistics/distributions/continuous/gamma/cdf.h>
using namespace Statistics::Distributions::Continuous::Gamma;
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
Interactive Calculator
a
b
x
upper
Result
Computing…
Set a range above first to export a graph.
This function's source code is only visible to registered users — documentation and the calculator above are free to use either way. Sign in to see it.