<< distfun_nbincdf Negative Binomial distfun_nbinpdf >>

Distfun >> Distfun > Negative Binomial > distfun_nbininv

distfun_nbininv

Negative Binomial Inverse CDF

Calling Sequence

x = distfun_nbininv(p,R,P)
x = distfun_nbininv(p,R,P,lowertail)

Parameters

p :

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

R :

a matrix of doubles, the number of successes. R belongs to the set {0,1,2,3,4,.......}

P :

a matrix of doubles, the probability of getting success in a Bernoulli trial. P in [0,1].

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 extra trials for R successes. x belongs to the set {0,1,2,3,...,N}

Description

Computes the Inverse cumulative distribution function of the Negative Binomial distribution function.

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

Examples

// Check with all arguments scalar
x = distfun_nbininv(0.21,10,0.5)
expected = 6

Bibliography

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

Authors


Report an issue
<< distfun_nbincdf Negative Binomial distfun_nbinpdf >>