expcdf
Exponential cumulative distribution function
Syntax
p = expcdf(x,mu)
[p,plo,pup] = expcdf(x,mu,pcov,alpha)
[p,plo,pup] = expcdf(___,'upper')
Description
p = expcdf(x,mu)
computes the exponential cdf at each of the values inx
using the corresponding mean parametermu
.x
andmu
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 inmu
must be positive.
[p,plo,pup] = expcdf(x,mu,pcov,alpha)
produces confidence bounds forPp
when the input mean parametermu
is an estimate.pcov
is the variance of the estimatedmu
.alpha
specifies 100(1 -alpha
)% confidence bounds. The default value ofalpha
is 0.05.plo
andpup
are arrays of the same size asp
containing the lower and upper confidence bounds. The bounds are based on a normal approximation for the distribution of the log of the estimate ofmu
. If you estimatemu
from a set of data, you can get a more accurate set of bounds by applyingexpfit
to the data to get a confidence interval formu
, and then evaluatingexpinv
at the lower and upper endpoints of that interval.
[p,plo,pup] = expcdf(___,'upper')
returns the complement of the exponential cdf at each value inx
, using an algorithm that more accurately computes the extreme upper tail probabilities. You can use the'upper'
argument with any of the prior syntaxes.
The exponential cdf is
The result,p, is the probability that a single observation from an exponential distribution will fall in the interval [0x].