Evaluates the Poisson distribution CDF.

You're viewing an older version of this page (#176). View the current version.

View versions (1)

Interface

#include <codecogs/statistics/distributions/discrete/poisson/cdf.h>

using namespace Statistics::Distributions::Discrete::Poisson;

This function evaluates the Poisson distrubtion CDF.

Example:

#include <stdio.h>
#include <codecogs/statistics/distributions/discrete/poisson/cdf.h>
using namespace Stats::Dists::Discrete::Poisson;
int main()
{
  int k[10] = { 9, 5, 1, 5, 8, 9, 0, 5, 2, 10 };
  double m[10] = { 1.0, 7.3, 0.2, 4.7, 5.4, 6.0, 9.3, 8.9, 1.8, 6.2 };
  for( int i=0; i<10; i++ )
    printf(  "CDF( %i, %1.1f, true ) = %f \n",
      k[i], m[i], CDF( k[i], m[i] )  );
  return getchar();
}

Output:

CDF( 9, 1.0, true ) = 1.000000
CDF( 5, 7.3, true ) = 0.264043
CDF( 1, 0.2, true ) = 0.982477
CDF( 5, 4.7, true ) = 0.668438
CDF( 8, 5.4, true ) = 0.902650
CDF( 9, 6.0, true ) = 0.916076
CDF( 0, 9.3, true ) = 0.000091
CDF( 5, 8.9, true ) = 0.121900
CDF( 2, 1.8, true ) = 0.730621
CDF( 10, 6.2, true ) = 0.948559

Accuracy:

See Gamma_Lower_Reg

Parameters

k
the number of terms to sum, must be positive
m
lambda, must be strictly positive
upper
Default value = false

Returns

the sum of the terms k to infinity of the Poisson distribution
GPL Licence — free for non commercial use. See Licence details.

Interactive Calculator

k
m
upper
Result