### Function Reference: `expcdf`

statistics: p = expcdf (x)
statistics: p = expcdf (x, mu)
statistics: p = expcdf (…, `"upper"`)
statistics: [p, plo, pup] = expcdf (x, mu, pcov)
statistics: [p, plo, pup] = expcdf (x, mu, pcov, alpha)
statistics: [p, plo, pup] = expcdf (…, `"upper"`)

Exponential cumulative distribution function (CDF).

For each element of x, compute the cumulative distribution function (CDF) of the exponential distribution with mean parameter mu. The size of p is the common size of x and mu. A scalar input functions as a constant matrix of the same size as the other inputs.

Default value is mu = 1.

A common alternative parameterization of the exponential distribution is to use the parameter λ defined as the mean number of events in an interval as opposed to the parameter μ, which is the mean wait time for an event to occur. λ and μ are reciprocals, i.e. μ = 1 / λ.

When called with three output arguments, i.e. `[p, plo, pup]`, `expcdf` computes the confidence bounds for p when the input parameter mu is an estimate. In such case, pcov, a scalar value with the variance of the estimated parameter mu, is necessary. Optionally, alpha, which has a default value of 0.05, specifies the `100 * (1 - alpha)` percent confidence bounds. plo and pup are arrays of the same size as p containing the lower and upper confidence bounds.

`[…] = expcdf (…, "upper")` computes the upper tail probability of the exponential distribution with parameter mu, at the values in x.

Further information about the exponential distribution can be found at https://en.wikipedia.org/wiki/Exponential_distribution

See also: expinv, exppdf, exprnd, expfit, explike, expstat

Source Code: expcdf

### Example: 1

     ## Plot various CDFs from the exponential distribution
     x = 0:0.01:5;
     p1 = expcdf (x, 2/3);
     p2 = expcdf (x, 1.0);
     p3 = expcdf (x, 2.0);
     plot (x, p1, "-b", x, p2, "-g", x, p3, "-r")
     grid on
     legend ({"μ = 2/3", "μ = 1", "μ = 2"}, "location", "southeast")
     title ("Exponential CDF")
     xlabel ("values in x")
     ylabel ("probability")