Categories &

Functions List

Function Reference: expinv

statistics: x = expinv (p)
statistics: x = expinv (p, mu)
statistics: [x, xlo, xup] = expinv (p, mu, pcov)
statistics: [x, xlo, xup] = expinv (p, mu, pcov, alpha)

Inverse of the exponential cumulative distribution function (iCDF).

For each element of p, compute the quantile (the inverse of the CDF) of the exponential distribution with mean mu. The size of x is the common size of p and mu. A scalar input functions as a constant matrix of the same size as the other inputs.

Default value is mu = 1.

A common alternative parameterization of the exponential distribution is to use the parameter λ defined as the mean number of events in an interval as opposed to the parameter μ, which is the mean wait time for an event to occur. λ and μ are reciprocals, i.e. μ = 1 / λ.

When called with three output arguments, i.e. [x, xlo, xup], expinv computes the confidence bounds for x when the input parameter mu is an estimate. In such case, pcov, a scalar value with the variance of the estimated parameter mu, is necessary. Optionally, alpha, which has a default value of 0.05, specifies the 100 * (1 - alpha) percent confidence bounds. xlo and xup are arrays of the same size as x containing the lower and upper confidence bounds.

Further information about the exponential distribution can be found at https://en.wikipedia.org/wiki/Exponential_distribution

See also: expcdf, exppdf, exprnd, expfit, explike, expstat

Source Code: expinv

Example: 1

 

 ## Plot various iCDFs from the exponential distribution
 p = 0.001:0.001:0.999;
 x1 = expinv (p, 2/3);
 x2 = expinv (p, 1.0);
 x3 = expinv (p, 2.0);
 plot (p, x1, "-b", p, x2, "-g", p, x3, "-r")
 grid on
 ylim ([0, 5])
 legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "northwest")
 title ("Exponential iCDF")
 xlabel ("probability")
 ylabel ("values in x")

                    
plotted figure