| Statistics Toolbox | Search  Help Desk |
| expcdf | Examples |
Exponential cumulative distribution function (cdf).
Syntax
P = expcdf(X,MU)
Description
expcdf(X,MU) computes the exponential cdf with parameter settings MU at the values in X. The arguments X and MU must be the same size except that a scalar argument functions as a constant matrix of the same size of the other argument. The parameter MU must be positive. The exponential cdf is:
Examples
The median of the exponential distribution is µ*log(2). Demonstrate this fact.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 will be 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