**Probability Density Function:** $ f_X(x) = \begin{cases} \lambda e^{-\lambda x} & \text{when } x \ge 0\\ 0 & \text{when } x <0 \end{cases} $ ![[exponential-distribution.png|center|400]] **Tail Probability:** To compute the probability that the [[Random Variable]] $X$ is bigger than some value $a$, we need to apply rules to [[Differentiation Rules#Exponential Functions|differentiate exponential functions]]. $ \begin{align} \mathbf P(X \ge a) &= \int_a^\infty \lambda* e^{-\lambda x} * dx \\[4pt] &= \lambda*-\frac{1}{\lambda} e^{-\lambda x} \: \Big \vert_a^\infty \\[6pt] &= -e^{-\lambda x} \: \Big \vert_a^\infty \\[8pt] &=\underbrace{-e^{-\lambda \infty}}_{=0} + e^{-\lambda a} \end{align} $ When we set $a=0$ then we get the whole sample space which has $\mathbf P(X \ge0)=1$. $ \begin{align} \mathbf P(X \ge a)&=e^{-\lambda a} \\ \mathbf P(X \ge 0)&=e^{-\lambda 0}=1 \end{align} $ **Cumulative Density Function:** The inverse of the tail probability is the [[Cumulative Density Function]], which is defined as $\mathbf P(X \le x)$. $ \begin{align} F_X(x) &= \mathbf P(X \le a) \\ &= 1-\mathbf P(X \ge a) \\ &= 1-e^{-\lambda a} \end{align} $ **Expectation:** $ \begin{align} \mathbb E[X]&= \int_{-\infty}^\infty x*f_X(x)*dx \tag{1}\\[8pt] &= \int_0^\infty x*\lambda e^{-\lambda x}*dx \tag{2}\\[8pt] &=\Big[\frac{x^2}{2} - e^{-\lambda x} \Big ]_0^\infty \tag{3}\\[8pt] &=\frac{1}{\lambda} \tag{4} \end{align} $ (2) Restrict the integration to positive range, as there is no mass for $x<0$. (3) Apply [[Integration by Parts]]. **Variance:** To obtain the [[Variance]], we first compute the second moment of $X$. $ \mathbb E[X^2]= \int_0^\infty x^2 * \lambda e^{-\lambda x} * dx =\frac{2}{\lambda^2} $ Then we can apply the [[Variance#^559043|method of moments]] formula. $ \begin{align} \mathrm{Var}(X) &= \mathbb E[X^2]- (\mathbb E[X])^2 \\ &= \frac{2}{\lambda^2} - \Big(\frac{1}{\lambda}\Big)^2\\ &= \frac{1}{\lambda^2} \end{align} $ The definition of variance for an exponential also makes intuitive sense. The smaller $\lambda$ the flatter the PDF and the higher its variance. ## Memorylessness Exactly like a [[Geometric Distribution]], the exponential distribution possess the memorylessness property. This means that conditioning on the past, does not change the PDF going forward. **Example:** In an experiment we know that a light bulb dies at some unknown time $T$. Now, we are interested in the probability that the light bulb survives for $x$ periods of time. We evaluate this probability at two different points. - *Unconditional:* In the first case we start at time $0$. The light bulb still works $x$ periods later, when $T>x$. We use the formula for the tail probability. $ \mathbf P(T>x)=e^{-\lambda x} $ ![[memorylessness-unconditional.png|center|400]] - *Conditional:* Now we are at time $t$ and the light bulb has survived so far. Since some time has passed the remaining life of the light bulb is now $(T-t)$. The light bulb still works $x$ periods later, when the remaining life is bigger than $x$. $ \mathbf P(T-t >x \vert T > t) $ ![[memorylessness-conditional.png|center|400]] The 2 density functions show that, when we are at time $t$, it does not make a different if we exchange the used light bulb with a new one or not (”the light bulb does not remember that it has been used until now”). **Proof of memorylessness:** $ \begin{align} \mathbf P(T-t >x \vert T > t) &= \frac{\mathbf P\big((T-t>x) \space \cap \space (T >t)\big)}{\mathbf P(T >t)} \tag{1} \\[8pt] &= \frac{\mathbf P\big((T>t+x) \space \cap \space (T >t)\big)}{\mathbf P(T >t)} \tag{2} \\[8pt] &= \frac{\mathbf P(T-t >x)}{\mathbf P(T >t)} \tag{3} \\[8pt] &=\frac{e^{-\lambda (x+t)}}{e^{-\lambda (t)}} \tag{4} \\[8pt] &= e^{-\lambda x} \end{align} $ (1) We apply [[Bayes Rule]] to convert a [[Conditional Probability]] into a fraction of the intersection divided by the condition. (2) We flip $(T-t>x)$ into $(T> t+x)$. When we now look at the intersection with $(T>t)$ we can get rid of the latter, since it is a subset of the first term. (4) We apply the formula of tail probabilities of exponential r.v’s. ## Similarity to Geometric Distribution The exponential distribution can be viewed as the continuous counterpart of the geometric distribution. - *Geometric:* Models the time until the first in a sequence of Bernoulli trials succeeds (e.g. dice rolls). - *Exponential:* Model the time until something happens (e.g. light bulb burns out). $ \begin{align} \mathbb E[X] &= 1/p \quad \text{when } X \sim \mathrm{Geom} \\[4pt] \mathbb E[X] &= 1/\lambda \quad \text{when } X \sim \mathrm{Exp} \end{align} $