The Poisson distribution models the number of events that occur in a fixed time interval, provided that:
-
Events occur independently.
-
The average rate of occurrence (λ) is constant.
When should you use Poisson?
-
Number of calls per minute in a call center.
-
Customer arrivals to a store.
-
Manufacturing defects per day.
Parameter:
λ (lambda): the expected mean number of events per interval.
For example, if λ = 3, on average there will be 3 events per unit of time, although there can be 2, 4, 0, etc. The variability is part of the distribution.
Relationship with the exponential distribution
-
Poisson counts how many events occur.
-
Exponential measures the time between events.
Both are controlled by the same parameter λ, and they are complementary:
Poisson(λ): Number of events per interval λ
Exponential(λ): Time between consecutive events 1 / λ
What does this example show?
A visual comparison of both distributions for 3 different values of λ:
Function {Name:fPoisson1, TYPE:POISSON, LAMBDA:X$LAMBDA1}
Function {Name:fPoisson2, TYPE:POISSON, LAMBDA:X$LAMBDA2}
Function {Name:fPoisson3, TYPE:POISSON, LAMBDA:X$LAMBDA3}
Function {Name:fexp1, TYPE:EXP, LAMBDA:X$LAMBDA1, b:0}
Function {Name:fexp2, TYPE:EXP, LAMBDA:X$LAMBDA2, b:0}
Function {Name:fexp3, TYPE:EXP, LAMBDA:X$LAMBDA3, b:0}
The results are shown as dynamic text using the running mean:
Converges to λ = 3.0 → Mean ≈ 3.0 Converges to λ = 0.25 → Mean ≈ 0.25 Exp = 1 / λ = 0.333 → Mean ≈ 0.333
This simulation helps you see how:
-
Poisson stabilizes the event count toward λ.
-
Exponential stabilizes the time between events toward 1 / λ.
Example
/*
Poisson
*/
SYSTEM {TYPE:OPTIONS,Speed:5}
Graphic {NAME:pText1,Type:TEXT,X:309,Y:281,Text:"Mean1"}
Graphic {NAME:pText2,Type:TEXT,X:309,Y:238,Text:"Mean2"}
Graphic {NAME:pText3,Type:TEXT,X:308,Y:198,Text:"Mean3"}
Graphic {NAME:eText1,Type:TEXT,X:506,Y:280,Text:"Exp1"}
Graphic {NAME:eText2,Type:TEXT,X:506,Y:238,Text:"Exp2"}
Graphic {NAME:eText3,Type:TEXT,X:504,Y:196,Text:"Exp3"}
POSITION {NAME:POS1,X:598,Y:395}
INITIAL contador,0
INITIAL LAMBDA1,1/4
INITIAL iLAMBDA1,round(1/X$LAMBDA1,3)
INITIAL pTotal1,0
INITIAL eTotal1,0
INITIAL LAMBDA2,3/4
INITIAL iLAMBDA2,round(1/X$LAMBDA2,3)
INITIAL pTotal2,0
INITIAL eTotal2,0
INITIAL LAMBDA3,3
INITIAL iLAMBDA3,round(1/X$LAMBDA3,3)
INITIAL pTotal3,0
INITIAL eTotal3,0
Function {Name:fPoisson1, TYPE:POISSON, LAMBDA:X$LAMBDA1}
Function {Name:fPoisson2, TYPE:POISSON, LAMBDA:X$LAMBDA2}
Function {Name:fPoisson3, TYPE:POISSON, LAMBDA:X$LAMBDA3}
Function {Name:fexp1, TYPE:EXP, LAMBDA:X$LAMBDA1, b:0}
Function {Name:fexp2, TYPE:EXP, LAMBDA:X$LAMBDA2, b:0}
Function {Name:fexp3, TYPE:EXP, LAMBDA:X$LAMBDA3, b:0}
START 2000
;*****************************************************
GENERATE 2,0,0,0 {NAME:GEN1,X:218,Y:395}
SAVEVALUE contador,X$contador + 1
; --- Accumulation Poisson ---
SAVEVALUE pTotal1,X$pTotal1 + FN$fPoisson1
SAVEVALUE pMedia1, X$pTotal1 / X$contador
SAVEVALUE pMediaRound1, round(X$pMedia1,3)
SAVEVALUE pTotal2,X$pTotal2 + FN$fPoisson2
SAVEVALUE pMedia2, X$pTotal2 / X$contador
SAVEVALUE pMediaRound2, round(X$pMedia2,3)
SAVEVALUE pTotal3,X$pTotal3 + FN$fPoisson3
SAVEVALUE pMedia3, X$pTotal3 / X$contador
SAVEVALUE pMediaRound3, round(X$pMedia3,3)
; --- Accumulation Exponential ---
SAVEVALUE eTotal1,X$eTotal1 + FN$fexp1
SAVEVALUE eMedia1, X$eTotal1 / X$contador
SAVEVALUE eMediaRound1, round(X$eMedia1,3)
SAVEVALUE eTotal2,X$eTotal2 + FN$fexp2
SAVEVALUE eMedia2, X$eTotal2 / X$contador
SAVEVALUE eMediaRound2, round(X$eMedia2,3)
SAVEVALUE eTotal3,X$eTotal3 + FN$fexp3
SAVEVALUE eMedia3, X$eTotal3 / X$contador
SAVEVALUE eMediaRound3, round(X$eMedia3,3)
move {name:pText1,text:"Converges to Lambda = X$LAMBDA1 --> X$pMediaRound1"}
move {name:pText2,text:"Converges to Lambda = X$LAMBDA2 --> X$pMediaRound2"}
move {name:pText3,text:"Converges to Lambda = X$LAMBDA3 --> X$pMediaRound3"}
move {name:eText1,text:"Exp = 1/X$LAMBDA1 = X$iLAMBDA1 --> X$eMediaRound1"}
move {name:eText2,text:"Exp = 1/X$LAMBDA2 = X$iLAMBDA2 --> X$eMediaRound2"}
move {name:eText3,text:"Exp = 1/X$LAMBDA3 = X$iLAMBDA3 --> X$eMediaRound3"}
ADVANCE 30,10 {TO:POS1}
ENDGENERATE 1