|Poisson Distribution Method|
Poisson Distribution Results
Poisson Distribution Method
In probability theory and statistics, the Poisson distribution is a discrete probability distribution. It describes
the probability of a number of events occurring in a fixed time period. The Poisson distribution is not limited to a
time interval domain. It can also be used for the number of events in other specified intervals suchs as distance,
area, or volume.
The Poisson and Exponential distributions (see) "Exponential Distribution" are related. If
the number of counts follow the Poisson distribution, then the interval between individual counts follow the exponential
Probability Density Function
The probability density function for the Poisson distribution can be expressed as:
where x is a positive integer, representing the number of occurrences of an event.
Poisson Random Number Generator
The code for generating Poisson random numbers is based on a rejection method. This code is not shown.
Testing the Poisson Distribution Method
To test the Poisson Distribution method, a new static method has been added. The TestPoissonDistribution() method has
been written and executed. No additional code is shown. The user can change variables as desired.
For the test, two parameters were set:
number of bins = 15; (nBins)
number of points = 2000; (nPoints)
where the parameter (nBins) is the number of bins in the histogram and (nPoints)
is the number of random points. A random array is created using the poisson distribution. A comparison is made between
the histogram of random data and the theoretical probability density function of the poisson distribution. One can see the
results from the Poisson random generator are very close to the theoretical Poisson distribution function.
Running this example generates the results shown above.
static void TestPoissonDistribution();
for (int i = 0; i < nBins; i++)
ListBox1.Items.Add(" x = " + xdata[i] + "," + " - - - - -> Random Data = " + ydata[i] + "," + " - - - - -> Density Distribution = " + Math.Round(ydistribution[i] * normalizeFactor, 0).ToString());