<< distfun_poisscdf Poisson distfun_poisspdf >>

Distfun >> Distfun > Poisson > distfun_poissinv

distfun_poissinv

Poisson Inverse CDF

Calling Sequence

x = distfun_poissinv(p,lambda)
x = distfun_poissinv(p,lambda,lowertail)

Parameters

p :

a matrix of doubles, the probability. Must be in the range [0,1].

lambda :

a matrix of doubles, the average rate of occurrence. lambda>0.

lowertail :

a 1-by-1 matrix of booleans, the tail (default lowertail=%t). If lowertail is true (the default), then considers P(X<=x) otherwise P(X>x).

x :

a matrix of doubles, the outcome. x belongs to the set {0,1,2,3,......}

Description

Computes the Inverse cumulative distribution function of the Poisson distribution function.

Any scalar input argument is expanded to a matrix of doubles of the same size as the other input arguments.

Examples

// Test with p scalar, lambda scalar
x = distfun_poissinv(0.999,5)
expected = 13;
x = distfun_poissinv(1-0.999,5,%f)
expected = 13;

// Test with expanded p , scalar lambda
x = distfun_poissinv([0.32 0.3],2)
expected = [1. 1.];

// Test with scalar p, expanded lambda
x = distfun_poissinv(0.22,[3 2])
expected = [2. 1.];

// Test small values of p
x = distfun_poissinv(1.e-15,1)
expected = 0.;
x = distfun_poissinv(1.e-15,1,%f)
expected = 17.;

Bibliography

http://en.wikipedia.org/wiki/Poisson_distribution

Authors


Report an issue
<< distfun_poisscdf Poisson distfun_poisspdf >>