<< distfun_expcdf Exponential distfun_exppdf >>

Distfun >> Distfun > Exponential > distfun_expinv

distfun_expinv

Exponential Inverse CDF

Calling Sequence

x = distfun_expinv ( p , mu )
x = distfun_expinv ( p , mu , lowertail )

Parameters

p:

a matrix of doubles, the probability

mu :

a matrix of doubles, the average. Must be positive.

lowertail :

a 1x1 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

Description

This function computes the Exponential Quantile.

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

Any optional input argument equal to the empty matrix will be set to its default value.

Notice that mu, the average, is the inverse of the rate. Other computing languages (including R), use 1/mu as the parameter of the exponential distribution.

Examples

// Check the inversion
x=3;
mu=1/2;
p = distfun_expcdf ( x , mu ) // p = 0.9975212
x = distfun_expinv ( p , mu ) // x = 3

// See upper tail
p = distfun_expinv ( 0.8 , 1/2 )
p = distfun_expinv ( 0.8 , 1/2 , %f )
// See an extreme case
distfun_expinv ( 1.e-20 , 1/2 , %f )

Authors

Bibliography

Wikipedia, Exponential distribution function, http://en.wikipedia.org/wiki/Exponential_distribution

<< distfun_expcdf Exponential distfun_exppdf >>