Exponential cumulative distribution function
p = expcdf(x,mu)
[p,plo,pup] = expcdf(x,mu,pcov,alpha)
[p,plo,pup] = expcdf(___,'upper')
p = expcdf(x,mu) computes
the exponential cdf at each of the values in
the corresponding mean parameter
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
[p,plo,pup] = expcdf(x,mu,pcov,alpha) produces confidence bounds for
p when the input mean parameter
mu is an
pcov is the variance of the estimated
alpha)% confidence bounds. The default value of
alpha is 0.05.
are arrays of the same size as
p 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
expfit to the data to get a confidence interval for
mu, and then evaluating
expinv at the lower
and upper endpoints of that interval.
[p,plo,pup] = expcdf(___,'upper') returns
the complement of the exponential cdf at each value in
using an algorithm that more accurately computes the extreme upper
tail probabilities. You can use the
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 [0 x].
The following code shows that the median of the exponential distribution is
mu = 10:10:60; p = expcdf(log(2)*mu,mu)
p = 1×6 0.5000 0.5000 0.5000 0.5000 0.5000 0.5000
What is the probability that an exponential random variable is less than or equal to the mean, µ?
mu = 1:6; x = mu; p = expcdf(x,mu)
p = 1×6 0.6321 0.6321 0.6321 0.6321 0.6321 0.6321
This function fully supports GPU arrays. For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox).