Main Content

Exponential Distribution

Overview

The exponential distribution is a one-parameter family of curves. The exponential distribution models wait times when the probability of waiting an additional period of time is independent of how long you have already waited. For example, the probability that a light bulb will burn out in its next minute of use is relatively independent of how many minutes it has already burned.

Statistics and Machine Learning Toolbox™ offers several ways to work with the exponential distribution.

  • Create a probability distribution objectExponentialDistributionby fitting a probability distribution to sample data (fitdist) or by specifying parameter values (makedist). Then, use object functions to evaluate the distribution, generate random numbers, and so on.

  • Work with the exponential distribution interactively by using theDistribution Fitterapp. You can export an object from the app and use the object functions.

  • Use distribution-specific functions (expcdf,exppdf,expinv,explike,expstat,expfit,exprnd) with specified distribution parameters. The distribution-specific functions can accept parameters of multiple exponential distributions.

  • Use generic distribution functions (cdf,icdf,pdf,random) with a specified distribution name ('Exponential') and parameters.

Parameters

The exponential distribution uses the following parameter.

Parameter Description 金宝app
mu(μ) Mean μ> 0

The parameterμis also equal to the standard deviation of the exponential distribution.

The standard exponential distribution hasμ=1.

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

Parameter Estimation

Thelikelihood functionis the probability density function (pdf) viewed as a function of the parameters. Themaximum likelihood estimates(MLEs) are the parameter estimates that maximize the likelihood function for fixed values ofx.

The maximum likelihood estimator ofμfor the exponential distribution is x ¯ = i = 1 n x i n , where x ¯ is the sample mean for samplesx1,x2, …,xn. The sample mean is an unbiased estimator of the parameterμ.

To fit the exponential distribution to data and find a parameter estimate, useexpfit,fitdist, ormle. Unlikeexpfitandmle, which return parameter estimates,fitdistreturns the fitted probability distribution objectExponentialDistribution. The object propertymustores the parameter estimate.

For an example, seeFit Exponential Distribution to Data.

Probability Density Function

The pdf of the exponential distribution is

y = f ( x | μ ) = 1 μ e x μ .

For an example, seeCompute Exponential Distribution pdf.

Cumulative Distribution Function

The cumulative distribution function (cdf) of the exponential distribution is

p = F ( x | u ) = 0 x 1 μ e t μ d t = 1 e x μ .

The resultpis the probability that a single observation from the exponential distribution with meanμfalls in the interval[0,x].

For an example, seeCompute Exponential Distribution cdf.

Inverse Cumulative Distribution Function

The inverse cumulative distribution function (icdf) of the exponential distribution is

x = F 1 ( p | μ ) = μ ln ( 1 p ) .

The resultxis the value such that an observation from an exponential distribution with parameterμfalls in the range [0x] with probabilityp.

Hazard Function

The hazard function (instantaneous failure rate) is the ratio of the pdf and the complement of the cdf. Iff(t) andF(t) are the pdf and cdf of a distribution (respectively), then the hazard rate is h ( t ) = f ( t ) 1 F ( t ) . Substituting the pdf and cdf of the exponential distribution forf(t) andF(t) yields a constantλ. The exponential distribution is the only continuous distribution with a constant hazard function.λis the reciprocal ofμand can be interpreted as the rate at which events occur in any given interval. Consequently, when you model survival times, the probability that an item will survive an extra unit of time is independent of the current age of the item.

For an example, seeExponentially Distributed Lifetimes.

Examples

Fit Exponential Distribution to Data

Generate a sample of100of exponentially distributed random numbers with mean700.

x = exprnd(700,100,1);% Generate sample

Fit an exponential distribution to data usingfitdist.

pd = fitdist(x,'exponential')
pd = ExponentialDistribution Exponential distribution mu = 641.934 [532.598, 788.966]

fitdistreturns anExponentialDistributionobject. The interval next to the parameter estimate is the 95% confidence interval for the distribution parameter.

Estimate the parameter using the distribution functions.

[muhat,muci] = expfit(x)% Distribution specific function
muhat = 641.9342
muci =2×1532.5976 788.9660
[muhat2,muci2] = mle(x,'distribution','exponential')% Generic distribution function
muhat2 = 641.9342
muci2 =2×1532.5976 788.9660

Compute Exponential Distribution pdf

Compute the pdf of an exponential distribution with parametermu = 2.

x = 0:0.1:10; y = exppdf(x,2);

Plot the pdf.

figure; plot(x,y) xlabel('Observation') ylabel('Probability Density')

Compute Exponential Distribution cdf

Compute the cdf of an exponential distribution with parametermu = 2.

x = 0:0.1:10; y = expcdf(x,2);

Plot the cdf.

figure; plot(x,y) xlabel('Observation') ylabel('Cumulative Probability')

Exponentially Distributed Lifetimes

Compute the hazard function of the exponential distribution with meanmu = 2at the values one through five.

x = 1:5; lambda1 = exppdf(x,2)./(1-expcdf(x,2))
lambda1 =1×50.5000 0.5000 0.5000 0.5000 0.5000

The hazard function (instantaneous rate of failure to survival) of the exponential distribution is constant and always equals1/mu. This constant is often denoted by λ.

Evaluate the hazard functions of the exponential distributions with means one through five atx = 3.

mu = 1:5; lambda2 = exppdf(3,mu)./(1-expcdf(3,mu))
lambda2 =1×51.0000 0.5000 0.3333 0.2500 0.2000

The probability that an item with an exponentially distributed lifetime survive one more unit of time is independent of how long it has survived.

Compute the probability of an item surviving one more year at various ages when the mean survival time is10years.

x2 = 5:5:25; x3 = x2 + 1; deltap = (expcdf(x3,10)-expcdf(x2,10))./(1-expcdf(x2,10))
deltap =1×50.0952 0.0952 0.0952 0.0952 0.0952

The probability of surviving one more year is the same regardless of how long an item has already survived.

Related Distributions

  • Burr Type XII Distribution— The Burr distribution is a three-parameter continuous distribution. An exponential distribution compounded with a gamma distribution on the mean yields a Burr distribution.

  • Gamma Distribution— The gamma distribution is a two-parameter continuous distribution that has parametersa(shape) andb(scale). Whena= 1, the gamma distribution is equal to the exponential distribution with meanμ=b. The sum ofkexponentially distributed random variables with meanμhas a gamma distribution with parametersa=kandμ=b.

  • Geometric Distributiondi -几何分布是一个单参数screte distribution that models the total number of failures before the first success in repeated Bernoulli trials. The geometric distribution is a discrete analog of the exponential distribution and is the only discrete distribution with a constant hazard function.

  • Generalized Pareto Distribution— The generalized Pareto distribution is a three-parameter continuous distribution that has parametersk(shape),σ(scale), andθ(threshold). When bothk= 0andθ= 0, the generalized Pareto distribution is equal to the exponential distribution with meanμ=σ.

  • Poisson Distribution— The Poisson distribution is a one-parameter discrete distribution that takes nonnegative integer values. The parameterλis both the mean and the variance of the distribution. The Poisson distribution models counts of the number of times a random event occurs in a given amount of time. In such a model, the amount of time between occurrences is modeled by the exponential distribution with mean 1 λ .

  • Weibull Distribution— The Weibull distribution is a two-parameter continuous distribution that has parametersa(scale) andb(shape). The Weibull distribution is also used to model lifetimes, but it does not have a constant hazard rate. Whenb= 1, the Weibull distribution is equal to the exponential distribution with meanμ=a.

    For an example, seeCompare Exponential and Weibull Distribution Hazard Functions.

References

[1] Crowder, Martin J., ed.Statistical Analysis of Reliability Data. Reprinted. London: Chapman & Hall, 1995.

[2] Kotz, Samuel, and Saralees Nadarajah.Extreme Value Distributions: Theory and Applications. London : River Edge, NJ: Imperial College Press; Distributed by World Scientific, 2000.

[3] Meeker, William Q., and Luis A. Escobar.Statistical Methods for Reliability Data. Wiley Series in Probability and Statistics. Applied Probability and Statistics Section. New York: Wiley, 1998.

[4] Lawless, Jerald F.寿命数据的统计模型和方法. 2nd ed. Wiley Series in Probability and Statistics. Hoboken, N.J: Wiley-Interscience, 2003.

See Also

|||||||||

Related Topics