discrete Erlang distribution bounds
[dist_inf,dist_sup] =atkTr_erlangBounds(shape,rate,time,size)
shape parameter of the Erlang distribution
rate parameter of the Erlang distribution
end of simulation time
inverse of the discretization interval width
returns a discrete lower bounding
sorted distribution tlist
dist_inf
and a discrete upper bounding sorted distribution tlist dist_sup
of an Erlang distribution with parameters shape
and rate
. The product time
*size
is the number of bins of the bounding distributions.
// Boundings with 30 bins [dist_inf30,dist_sup30] =atkTr_erlangBounds(2,2,5,6) // Boundings with 100 bins [dist_inf100,dist_sup100] =atkTr_erlangBounds(2,2,5,20) // Continous cumulative distribution function P=cdfgam("PQ",dist_inf30.state,2*ones(1,30),2*ones(1,30)) // Plots of the cumulative distribution functions clf() plot2d2(dist_inf30.state,cumsum(dist_inf30.probability),color('orange')) plot2d2(dist_sup30.state,cumsum(dist_sup30.probability),color('purple')) plot2d2(dist_inf100.state,cumsum(dist_inf100.probability),color('red')) plot2d2(dist_sup100.state,cumsum(dist_sup100.probability),color('green')) plot2d(dist_inf30.state,P,color('blue')) legends(['inf30';'inf100';'continuous';'sup100';'sup30'],.. [color('orange') color('red') color('blue') color('green') color('purple')],.. opt="lr") | ![]() | ![]() |