# Maxima and minima involving exponential random variables

I have a scenario where events can be modeled as exponentially distributed random variables, however, I need to consider logical combinations of these variables. For example, say I have three timers that go off according to an exponential distribution. I wait until one of two conditions are met: both timers 1 and 2 ring, or both timers 1 and 3 ring. I need to find the expected amount of time for this to occur. Eventually, I will earn some reward for the amount of time I wait, and want to figure out the expected reward. But right now I'm having issues with this probability. In general, I could have any number of timers, but my logical end conditions can always be written as the OR of ANDs.

My first thought would be to use conditional expectation to break it into pieces. But first, I think I need the probability at any given time none of my stopping criteria have been met. That is, for time $t$, $P(t<\min\{\max(1\land 2),\max(1\land3)\})$. Then integrate this from 0 to infinity, and call this probability $T$.

Let $T$ be the event that I have not yet stopped at time time $t$. That is, I'm trying to figure the probability that time $t$ has passed and my stopping criteria have not yet been met.

$E[T] = E[T|(1\land 2)]*P(1\land2) + E[T|(1\land 3)] *P(1\land 3)$

$= \frac{\lambda_1\lambda_2}{(\lambda_1+\lambda_2+\lambda_3)^2}E[P(t>\max(1,2))] + \frac{\lambda_1\lambda_3}{(\lambda_1+\lambda_2+\lambda_3)^2}E[P(t>\max(1,3))]$

Am I doing the conditional expectation correctly or is there a better approach that might scale with an arbitrary number of timers?

• What is $t$?  – Did Jul 1 '16 at 12:37
• Added to the edits. – CoconutBandit Jul 1 '16 at 12:42
• "Let T be the event that I stop at time time t" No, this is certainly not how the T you consider is defined. – Did Jul 1 '16 at 12:43
• Sorry, I guess it should be the opposite of what you quote. – CoconutBandit Jul 1 '16 at 12:48
• Irrelevant. The trouble is that T is not an event. – Did Jul 1 '16 at 12:50

## 1 Answer

It may be easier to work with CDFs: If $X_1 \sim Exp(rate=\lambda_1)$ and $X_2 \sim Exp(rate = \lambda_2)$, then the CDF of $W_{12} = \max(X_1, X_2)$ has the CDF $$F_{12}(t) = P(W_{12} \le t) = (1-e^{-\lambda_1 t})(1-e^{-\lambda_2 t}),$$ from which you can find $E(W_{12}).$

A somewhat similar formula expresses the CDF of the minimum of two random variables.

For particular known rates $\lambda_i,$ it is easy to get a good approximation of the overall problem using simulation. The following simulation uses rates $\lambda_i = i,$ for $i = 1,2,3.$ From the simulation we get (correct to 2 or 3 significant digits) $E(T) \approx 1.03,\,SD(T) \approx 0.98,\,$ and $P(T > 2) \approx 0.14.$

 m = 10^6;  lam1 = 1; lam2 = 2; lam3 = 3
x1 = rexp(m, lam1); x2 = rexp(m, lam2);  x3 = rexp(m, lam3)
w12 = pmax(x1,x2);  w13 = pmax(x1, x3)
t = pmin(w12, w13)
mean(t);  sd(t);  mean(t > 2)
## 1.035684    # aprx E(T)
## 0.9805355   # aprx SD(T)
## 0.136419    # aprx P(T > 2)


If this is an applied problem with known $\lambda_i,$ simulation may be all you need. In any case simulation can be a good way to check a few particular instances of general analytic results.

Note: The maximum of exponentials is not exponential. The minimum is exponential. If $W = max(X_1, X_2),$ where $X_1, X_2 \stackrel{iid}{\sim} Exp(\lambda),$ then $E(W) = \frac{1}{2\lambda} + \frac{1}{\lambda};$ time $\frac{1}{2\lambda}$ for the first, and then (by the no-memory property) time $\frac{1}{\lambda}$ for the second.

• Thanks for your help. How do I then find the minimum of these maximal distributions? – CoconutBandit Jul 5 '16 at 12:59
• The reliability function is $R(x) = 1 - F(x) = P(X > x).$ Let $V = \min(Y_1,Y_2).$ One standard metnod is to use $R_V(v) = P(Y_1 >v, Y_2 > v) = P(Y_1 >v)P(Y_2 > v).$ – BruceET Jul 6 '16 at 2:39