Or login with:
| doubleCDF( | double | a | |
| double | b | ||
| double | x | ||
| bool | upper = false | ) |
#include <stdio.h> #include <codecogs/stats/dists/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(); }
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
| 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 |
Source code is available when you buy a Commercial licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.
You must login to leave a messge