1classdef Poisson < DiscreteDistribution
2 % Poisson Discrete distribution
for counting rare events
4 % Poisson represents the Poisson distribution with rate parameter lambda.
5 % This distribution models the number of events occurring in a fixed interval
6 % when events occur independently at a constant average rate. It
is commonly
7 % used
for modeling arrival counts, defects, and other rare
event phenomena.
9 % @brief Poisson distribution
for modeling discrete
event counts
11 % Key characteristics:
12 % - Single parameter: rate lambda (average number of events)
13 % - Mean = Variance = lambda
14 % - SCV = 1/lambda (decreases as lambda increases)
15 % - Support: {0, 1, 2, 3, ...}
16 % - Limit of binomial distribution as n→∞, p→0, np→lambda
18 % The Poisson distribution
is used
for:
19 % - Counting arrivals in fixed time intervals
20 % - Modeling defects or failures
21 % - Call center arrival modeling
22 % - Network packet arrival counts
23 % - Population dynamics and birth processes
27 % arrival_count = Poisson(3.5); % Average 3.5 arrivals per interval
28 % samples = arrival_count.sample(1000); % Generate counts
31 % Copyright (c) 2012-2026, Imperial College London
32 % All rights reserved.
35 function self = Poisson(lambda)
36 % POISSON Create a Poisson distribution instance
38 % @brief Creates a Poisson distribution with specified rate parameter
39 % @param lambda Rate parameter (average number of events, must be positive)
40 % @return self Poisson distribution instance
41 self@DiscreteDistribution('Poisson', 1, [0,Inf]);
42 setParam(self, 1,
'lambda', lambda);
43 self.immediate = (1/lambda) < GlobalConstants.FineTol;
44 self.obj = jline.lang.processes.Exp(lambda);
47 function X = sample(self, n)
49 % Get n samples from the distribution
50 lambda = self.getParam(1).paramValue;
52 % Generate uniform random variables
55 % Initialize output array
58 % Compute Poisson samples
using inverse transform sampling
72 function Ft = evalCDF(self,k)
73 % FT = EVALCDF(SELF,K)
74 % Evaluate the cumulative distribution function at K
76 lambda = self.getParam(1).paramValue;
77 Ft = poisscdf(k, lambda);
80 function L = evalLST(self, s)
82 % Evaluate the Laplace-Stieltjes transform of the distribution function at s
83 % For Poisson(λ), LST(s) = exp(λ(e^(-s) - 1))
85 lambda = self.getParam(1).paramValue;
86 L = exp(lambda * (exp(-s) - 1));
89 function mean = getMean(self)
90 lambda = self.getParam(1).paramValue;
94 function rate = getRate(self)
95 lambda = self.getParam(1).paramValue;
99 function scv = getSCV(self)
100 lambda = self.getParam(1).paramValue;
104 function scv = getVar(self)
105 lambda = self.getParam(1).paramValue;
109 function skew = getSkewness(self)
110 lambda = self.getParam(1).paramValue;
114 function proc = getProcess(self)
115 % PROC = GETPROCESS()
117 % Get process representation
for non-Markovian distribution
118 % Returns [mean, SCV] pair for use in network analysis
119 proc = [self.getMean(), self.getSCV()];