eexp {EnvStats} | R Documentation |
Estimate Rate Parameter of an Exponential Distribution
Description
Estimate the rate parameter of an exponential distribution, and optionally construct a confidence interval for the rate parameter.
Usage
eexp(x, method = "mle/mme", ci = FALSE, ci.type = "two-sided",
ci.method = "exact", conf.level = 0.95)
Arguments
x |
numeric vector of observations. |
method |
character string specifying the method of estimation. Currently the only
possible value is |
ci |
logical scalar indicating whether to compute a confidence interval for the
location or scale parameter. The default value is |
ci.type |
character string indicating what kind of confidence interval to compute. The
possible values are |
ci.method |
character string indicating what method to use to construct the confidence interval
for the location or scale parameter. Currently, the only possible value is
|
conf.level |
a scalar between 0 and 1 indicating the confidence level of the confidence interval.
The default value is |
Details
If x
contains any missing (NA
), undefined (NaN
) or
infinite (Inf
, -Inf
) values, they will be removed prior to
performing the estimation.
Let be a vector of
observations from an exponential distribution with
parameter
rate=
.
Estimation
The maximum likelihood estimator (mle) of is given by:
where
(Forbes et al., 2011). That is, the mle is the reciprocal of the sample mean.
Sometimes the exponential distribution is parameterized with a scale parameter instead of a rate parameter. The scale parameter is the reciprocal of the rate parameter, and the sample mean is both the mle and the minimum variance unbiased estimator (mvue) of the scale parameter.
Confidence Interval
When ci=TRUE
, an exact confidence intervals for
can be constructed based on the relationship between the
exponential distribution, the gamma distribution, and
the chi-square distribution. An exponential distribution
with parameter
rate=
is equivalent to a gamma distribution
with parameters
shape=1
and scale=
. The sum of
iid gamma random variables with parameters
shape=1
and
scale=
is a gamma random variable with parameters
shape=
and
scale=
. Finally, a gamma
distribution with parameters
shape=
and
scale=
is equivalent to 0.5 times a chi-square distribution with degrees of freedom
df=
. Thus, the quantity
has a chi-square
distribution with degrees of freedom
df=
.
A two-sided confidence interval for
is
therefore constructed as:
where is the
'th quantile of a
chi-square distribution with
degrees of freedom.
One-sided confidence intervals are computed in a similar fashion.
Value
a list of class "estimate"
containing the estimated parameters and other information.
See
estimate.object
for details.
Note
The exponential distribution is a special case of the gamma distribution, and takes on positive real values. A major use of the exponential distribution is in life testing where it is used to model the lifetime of a product, part, person, etc.
The exponential distribution is the only continuous distribution with a
“lack of memory” property. That is, if the lifetime of a part follows
the exponential distribution, then the distribution of the time until failure
is the same as the distribution of the time until failure given that the part
has survived to time .
The exponential distribution is related to the double exponential (also called Laplace) distribution, and to the extreme value distribution.
Author(s)
Steven P. Millard (EnvStats@ProbStatInfo.com)
References
Forbes, C., M. Evans, N. Hastings, and B. Peacock. (2011). Statistical Distributions. Fourth Edition. John Wiley and Sons, Hoboken, NJ.
Johnson, N. L., S. Kotz, and N. Balakrishnan. (1994). Continuous Univariate Distributions, Volume 1. Second Edition. John Wiley and Sons, New York.
See Also
Examples
# Generate 20 observations from an exponential distribution with parameter
# rate=2, then estimate the parameter and construct a 90% confidence interval.
# (Note: the call to set.seed simply allows you to reproduce this example.)
set.seed(250)
dat <- rexp(20, rate = 2)
eexp(dat, ci=TRUE, conf = 0.9)
#Results of Distribution Parameter Estimation
#--------------------------------------------
#
#Assumed Distribution: Exponential
#
#Estimated Parameter(s): rate = 2.260587
#
#Estimation Method: mle/mme
#
#Data: dat
#
#Sample Size: 20
#
#Confidence Interval for: rate
#
#Confidence Interval Method: Exact
#
#Confidence Interval Type: two-sided
#
#Confidence Level: 90%
#
#Confidence Interval: LCL = 1.498165
# UCL = 3.151173
#----------
# Clean up
#---------
rm(dat)