Products & Services Solutions Academia Support User Community Company

Learn more about Statistics Toolbox   

expcdf - Exponential cumulative distribution function

Syntax

P = expcdf(X,mu)
[P,PLO,PUP] = expcdf(X,mu,pcov,alpha)

Description

P = expcdf(X,mu) computes the exponential cdf at each of the values in X using the corresponding mean parameter mu. X 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.

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].

[P,PLO,PUP] = expcdf(X,mu,pcov,alpha) produces confidence bounds for P 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. PLO and PUP 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 by applying expfit to the data to get a confidence interval for mu, and then evaluating expinv at the lower and upper endpoints of that interval.

Examples

The following code shows that the median of the exponential distribution is µ*log(2).

mu = 10:10:60; 
p = expcdf(log(2)*mu,mu)
p =
  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 =
  0.6321  0.6321  0.6321  0.6321  0.6321  0.6321

See Also

, , , , , ,

See Also

cdf | expfit | expinv | explike | exppdf | exprnd | expstat

How To

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS