4.3 Exponential Distribution ============================ 4.3.1 Main Idea --------------- The **exponential distribution** models a continuous waiting time until the next event occurs when events arise independently at a constant average rate. It is closely connected to the Poisson process: - the **Poisson distribution** counts how many events occur in a fixed interval; - the **exponential distribution** measures how long we wait until the next event. Typical examples include: - time until the next customer arrives; - time between telephone calls; - distance until the next flaw appears; - lifetime of a component when its failure rate is constant. Let .. math:: \lambda>0 be the event rate per unit time or space. If :math:`X` denotes the waiting time until the next event, then .. math:: X\geq0. .. image:: ../_static/figures/continuous_distributions/figure_4_3_1_poisson_exponential_timeline.png :width: 86% :align: center The same event process can therefore be viewed in two ways. Over a fixed interval, we may count events. Starting from one event, we may instead measure the continuous distance or time to the next event. 4.3.2 Rate and Mean-Waiting-Time Parameterizations -------------------------------------------------- Two equivalent parameterizations are commonly used. If :math:`\lambda` is the event rate, then the mean waiting time is .. math:: \mu=\frac1\lambda. Equivalently, .. math:: \lambda=\frac1\mu. Some references use a symbol such as :math:`m` for this rate or **decay parameter**. In this handout, we use :math:`\lambda` consistently. Thus the two equivalent forms of the density are .. math:: f(x)=\lambda e^{-\lambda x} and .. math:: f(x)=\frac1\mu e^{-x/\mu}. The units are important: - :math:`\lambda` has units of events per unit time; - :math:`\mu` and :math:`X` have units of time. For example, if customers arrive at an average rate of 30 per hour, then .. math:: \lambda=\frac{30}{60}=0.5\text{ per minute}, so the mean waiting time is .. math:: \mu=\frac1{0.5}=2\text{ minutes}. 4.3.3 Probability Density Function ---------------------------------- A random variable :math:`X` has an exponential distribution with rate :math:`\lambda` if .. note:: **Exponential PDF** .. math:: f(x) = \begin{cases} \lambda e^{-\lambda x}, & x\geq0,\\ 0, & x<0. \end{cases} The density is largest at :math:`x=0`: .. math:: f(0)=\lambda. It then decreases continuously toward zero as :math:`x` increases. This is why small waiting times are more common than very large waiting times. As with every probability density function, the total area must equal 1: .. math:: \int_{-\infty}^{\infty}f(x)\,dx = \int_0^\infty \lambda e^{-\lambda x}\,dx. Since .. math:: \int \lambda e^{-\lambda x}\,dx = -e^{-\lambda x}, we obtain .. math:: \int_0^\infty \lambda e^{-\lambda x}\,dx = \left[-e^{-\lambda x}\right]_0^\infty = 0-(-1) =1. The value :math:`f(x)` is a **density**, not the probability of one exact waiting time. Because :math:`X` is continuous, .. math:: P(X=x)=0. 4.3.4 CDF and Survival Function ------------------------------- The cumulative distribution function is .. math:: F(x)=P(X\leq x). For :math:`x\geq0`, integrate the density from 0 to :math:`x`: .. math:: F(x) = \int_0^x \lambda e^{-\lambda t}\,dt. Therefore, .. math:: F(x) = \left[-e^{-\lambda t}\right]_0^x = 1-e^{-\lambda x}. Hence, .. note:: **Exponential CDF** .. math:: F(x) = \begin{cases} 0, & x<0,\\ 1-e^{-\lambda x}, & x\geq0. \end{cases} The complementary probability .. math:: P(X>x) is called the **survival function**. It is .. math:: P(X>x) = 1-F(x) = e^{-\lambda x}. This simple exponential tail is one of the most useful properties of the distribution. 4.3.5 Probability Calculations ------------------------------ For :math:`x\geq0`, .. math:: P(X\leq x) = 1-e^{-\lambda x}. For waiting **more than** :math:`x`, .. math:: P(X>x) = e^{-\lambda x}. For an interval :math:`0\leq a5) = e^{-0.5(5)} = e^{-2.5} \approx0.0821. **Probability that the waiting time is between one and three minutes** .. math:: P(1s+t\mid X>s) = P(X>t). To see why, use conditional probability: .. math:: P(X>s+t\mid X>s) = \frac{P(X>s+t)}{P(X>s)}. Using the survival function, .. math:: P(X>s+t\mid X>s) = \frac{e^{-\lambda(s+t)}}{e^{-\lambda s}} = e^{-\lambda t}. But .. math:: e^{-\lambda t}=P(X>t). Therefore, .. math:: \boxed{ P(X>s+t\mid X>s)=P(X>t) }. .. image:: ../_static/figures/continuous_distributions/figure_4_3_3_exponential_memoryless.png :width: 82% :align: center For the customer-arrival example, suppose 5 minutes have already passed with no arrival. The probability of waiting more than one **additional** minute is still .. math:: P(X>1) = e^{-0.5} \approx0.6065. The previous five minutes do not make an arrival “due.” 4.3.11 Connection to the Poisson Distribution --------------------------------------------- The Poisson and exponential distributions describe the same underlying event process from two different perspectives. Suppose events follow a Poisson process with rate :math:`\lambda`, and let .. math:: N(t)=\text{number of events during an interval of length }t. Then .. math:: N(t)\sim\operatorname{Poisson}(\lambda t). Let .. math:: T=\text{waiting time until the first event}. The event .. math:: T>t means that **no event has occurred by time** :math:`t`. Therefore, .. math:: P(T>t) = P(N(t)=0). Using the Poisson PMF, .. math:: P(N(t)=0) = \frac{e^{-\lambda t}(\lambda t)^0}{0!} = e^{-\lambda t}. Thus, .. math:: P(T>t)=e^{-\lambda t}. Therefore, .. math:: F_T(t) = 1-e^{-\lambda t}. Differentiating gives .. math:: f_T(t) = \lambda e^{-\lambda t}. This is exactly the exponential distribution. So: **Poisson** -> number of events in a fixed interval. **Exponential** -> waiting time until the next event. 4.3.12 Reliability Interpretation and Constant Hazard ----------------------------------------------------- The exponential distribution is often used in reliability when the failure rate is approximately constant. The hazard rate is .. math:: h(x) = \frac{f(x)}{P(X>x)}. For an exponential random variable, .. math:: h(x) = \frac{\lambda e^{-\lambda x}}{e^{-\lambda x}} = \lambda. Thus the hazard is constant over time. For example, suppose a component lifetime is exponential with mean 10 years. Then .. math:: \lambda=\frac1{10}=0.1\text{ per year}. The probability that it survives more than 7 years is .. math:: P(X>7) = e^{-0.1(7)} \approx0.4966. This model is appropriate only when a constant failure rate is plausible. It is not suitable for strong wear-out or aging behavior in which failure risk increases with age. 4.3.13 Exponential, Poisson, and Geometric ------------------------------------------ .. list-table:: :header-rows: 1 :widths: 28 24 24 24 * - Feature - Exponential - Poisson - Geometric * - Type - Continuous - Discrete - Discrete * - Random variable - Waiting time - Event count - Number of trials until success * - Typical setting - Continuous event process - Continuous event process - Repeated Bernoulli trials * - Memoryless - Yes - Not applicable in this form - Yes The exponential distribution can be viewed as the continuous analogue of the geometric waiting-time model. Both are memoryless, but one measures continuous time while the other counts discrete trials. 4.3.14 A Simple Method ---------------------- For an exponential problem: 1. Define what :math:`X` measures and identify its units. 2. Identify the event rate :math:`\lambda`, or convert from the mean using :math:`\lambda=1/\mu`. 3. Make the units of :math:`x` compatible with the units of :math:`\lambda`. 4. Translate the probability statement: - less than -> use :math:`1-e^{-\lambda x}`; - more than -> use :math:`e^{-\lambda x}`; - between -> subtract two CDF values. 5. Interpret the result in the original context. 4.3.15 Quick Practice --------------------- Calls arrive at a service desk according to a Poisson process at an average rate of 4 calls per hour. Let :math:`X` be the waiting time in hours until the next call. Find: (a) :math:`P(X>0.5)`; (b) :math:`P(X<0.25)`; (c) :math:`E(X)`; and (d) the median waiting time. **Answer** Here, .. math:: \lambda=4. For part (a), .. math:: P(X>0.5) = e^{-4(0.5)} = e^{-2} \approx0.1353. For part (b), .. math:: P(X<0.25) = 1-e^{-4(0.25)} = 1-e^{-1} \approx0.6321. For part (c), .. math:: E(X)=\frac14\text{ hour}=15\text{ minutes}. For part (d), .. math:: k_{0.50} = \frac{\ln2}{4}\text{ hour} \approx0.1733\text{ hour} \approx10.4\text{ minutes}. 4.3.16 Common Mistakes ---------------------- A common mistake is to confuse the rate with the mean waiting time. .. math:: \mu=\frac1\lambda, not :math:`\mu=\lambda`. Another mistake is to use inconsistent units. If :math:`\lambda` is measured per hour, then the waiting time inserted into the formula must be measured in hours. A third mistake is to treat :math:`f(x)` as a point probability. For a continuous random variable, .. math:: P(X=x)=0. Another mistake is to use a Poisson PMF when the question asks **how long** until an event. Poisson counts events; exponential measures waiting time. Finally, do not use the exponential model automatically for every lifetime. Its constant hazard rate excludes many aging and wear-out mechanisms. 4.3.17 Summary -------------- For .. math:: X\sim\operatorname{Exp}(\lambda), \qquad \lambda>0, with :math:`x\geq0`, .. math:: f(x)=\lambda e^{-\lambda x}, .. math:: F(x)=1-e^{-\lambda x}, and .. math:: P(X>x)=e^{-\lambda x}. The mean, variance, and standard deviation are .. math:: E(X)=\frac1\lambda, .. math:: \operatorname{Var}(X)=\frac1{\lambda^2}, and .. math:: \sigma=\frac1\lambda. The :math:`r`-th percentile is .. math:: k_r=-\frac{\ln(1-r)}{\lambda}. The distribution is memoryless: .. math:: P(X>s+t\mid X>s) = P(X>t). Its main connection to the Poisson distribution is: Poisson counts events; exponential measures the waiting time between them.