Exponential inverse cumulative distribution function


X = expinv(P,mu)
[X,XLO,XUP] = expinv(P,mu,pcov,alpha)


X = expinv(P,mu) computes the inverse of the exponential cdf with parameters specified by mean parameter mu for the corresponding probabilities in P. P and mu can be vectors, matrices, or multidimensional arrays that all have the same size. A scalar input is expanded to a constant array with the same dimensions as the other input. The parameters in mu must be positive and the values in P must lie on the interval [0 1].

[X,XLO,XUP] = expinv(P,mu,pcov,alpha) produces confidence bounds for X when the input mean parameter mu is an estimate. pcov is the variance of the estimated mu. alpha specifies 100(1 - alpha)% confidence bounds. The default value of alpha is 0.05. XLO and XUP are arrays of the same size as X containing the lower and upper confidence bounds. The bounds are based on a normal approximation for the distribution of the log of the estimate of mu. If you estimate mu from a set of data, you can get a more accurate set of bounds by applying expfit to the data to get a confidence interval for mu, and then evaluating expinv at the lower and upper end points of that interval.

The inverse of the exponential cdf is


The result, x, is the value such that an observation from an exponential distribution with parameter µ will fall in the range [0 x] with probability p.


Let the lifetime of light bulbs be exponentially distributed with µ = 700 hours. What is the median lifetime of a bulb?

ans =

Suppose you buy a box of “700 hour” light bulbs. If 700 hours is the mean life of the bulbs, half of them will burn out in less than 500 hours.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Introduced before R2006a