FUNCTION
Poisson probability density.
You're viewing an older version of this page (#157). View the current version.
Interface
#include <codecogs/statistics/distributions/discrete/poisson/pdf.h>
using namespace Statistics::Distributions::Discrete::Poisson;
Calculates the Poisson distribution probability density for a number of events, n, with an expected mean value of .
(1)
where
Example:
#include <iostream>
#include <codecogs/statistics/distributions/discrete/poisson/pdf.h>
using namespace Stats::Dists::Discrete::Poisson;
int main()
{
std::cout << "\nPoisson distribution probability density of 2 events and 5 mean value is : \n";
std::cout << "PDF(2,5) = " << PDF(2,5);
return 0;
}
Output:
Poisson distribution probability density of 2 events and 5 mean value is :
PDF(2,5) = 0.0842243
Parameters
n
the number of events (or sample size)
lambda
the expected mean value, which must be greater than zero.
Returns
the Poisson distribution probability density. Returns -1 on an error.
Interactive Calculator
n
lambda
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.