Statistics Toolbox
  Go to function:
    Search    Help Desk 
nbininv    Examples   See Also

Inverse of the negative binomial cumulative distribution function (cdf).

Syntax

Description

nbininv(Y,R,P) returns the inverse of the negative binomial cdf with parameters R and P. Since the binomial distribution is discrete, nbininv returns the least integer X such that the negative binomial cdf evaluated at X, equals or exceeds Y.

The size of X is the common size of the input arguments. A scalar input functions as a constant matrix of the same size as the other inputs.

The negative binomial models consecutive trials each having a constant probability, P, of success. The parameter, R, is the number of successes required before stopping.

Example

How many times would you need to flip a fair coin to have a 99% probability of having observed 10 heads?

Note that you have to flip at least 10 times to get 10 heads. That is why the second term on the right side of the equals sign is a 10.

See Also



[ Previous | Help Desk | Next ]