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
P = evalPMF(self, k)
82 % Evaluate
the probability mass function at K
84 lambda = self.getParam(1).paramValue;
85 P = poisspdf(k, lambda);
88 function L = evalLST(self, s)
90 % Evaluate
the Laplace-Stieltjes transform of
the distribution function at s
91 % For Poisson(λ), LST(s) = exp(λ(e^(-s) - 1))
93 lambda = self.getParam(1).paramValue;
94 L = exp(lambda * (exp(-s) - 1));
97 function mean = getMean(self)
98 lambda = self.getParam(1).paramValue;
102 function rate = getRate(self)
103 lambda = self.getParam(1).paramValue;
107 function scv = getSCV(self)
108 lambda = self.getParam(1).paramValue;
112 function scv = getVar(self)
113 lambda = self.getParam(1).paramValue;
117 function skew = getSkewness(self)
118 % Poisson skewness
is lambda^(-1/2): E[(X-mu)^3] = lambda and
119 % sigma^3 = lambda^(3/2). The former sqrt(lambda) inverted it.
120 lambda = self.getParam(1).paramValue;
121 skew = 1 / sqrt(lambda);
124 function proc = getProcess(self)
125 % PROC = GETPROCESS()
127 % Get process representation
for non-Markovian distribution
128 % Returns [mean, SCV] pair for use in network analysis
129 proc = [self.getMean(), self.getSCV()];