Exponential Distribution

DESCRIPTION:

Density, cumulative probability, quantiles and random generation for the exponential distribution.

USAGE:

dexp(x, rate=1, scale, log=F) 
pexp(q, rate=1, scale) 
qexp(p, rate=1, scale) 
rexp(n, rate=1, scale, bigdata=F) 

REQUIRED ARGUMENTS:

x
vector or bdVector of quantiles. Missing values ( NAs) are allowed.
q
vector or bdVector of quantiles. Missing values ( NAs) are allowed.
p
vector or bdVector of probabilities. Missing values ( NAs) are allowed.
n
sample size. If length(n) is larger than 1, then length(n) random values are returned.

OPTIONAL ARGUMENTS:

rate
the inverse of the mean of the distribution.
scale
alternate parameterization, the mean of the distribution. If scale is supplied and rate is not, then rate = 1/scale. This is ignored if rate is supplied.
bigdata
a logical value; if TRUE, an object of type bdVector is returned. Otherwise, a vector object is returned. This argument can be used only if the bigdata library section has been loaded.
log
a logical scalar; if TRUE, dexp will return the log of the density, not the density itself.

VALUE:

density ( dexp), probability ( pexp), quantile ( qexp), or random sample ( rexp) for the standard exponential distribution.

SIDE EFFECTS:

The function rexp causes creation of the dataset .Random.seed if it does not already exist, otherwise its value is updated.

DETAILS:

Elements of q or p that are missing will cause the corresponding elements of the result to be missing.

BACKGROUND:

The exponential distribution, a specialization of the gamma distribution (see Gamma), takes on positive real values. A major use of the exponential is in life testing. The exponential has the so called "memoryless property" that the distribution of failure time is the same as the distribution of failure time conditional on having survived to time t.

A relative of the exponential is the double exponential or Laplace distribution. The double exponential is "folded over" so that it is symmetric about zero.

For details on the uniform random number generator implemented in S-PLUS, see the set.seed help file.

REFERENCES:

Johnson, N. L. and Kotz, S. (1970). Continuous Univariate Distributions, vol. 1 and 2. Houghton-Mifflin, Boston.

SEE ALSO:

, , .

EXAMPLES:

values <- seq(0.0001, 6, length=200); bvals <- values[values>qexp(.95)] 
plot(values, dexp(values), type="l") 
polygon(c(qexp(.95), bvals, 6), c(0, dexp(bvals), 0)) 
abline(h=0); abline(v=0)