Number of events in a segment if waiting times are drawn from a mixture of two exponential distributions What is the probability for $n$ events to occur over a period of time $t$, if the duration of each event is a random variable distributed as a mixture of two exponential distributions, one with the average duration $\tau_1$ and the probability $p$ and the other with average duration $\tau_2$ and the probability of $(1-p)$? 
For example, we have a doctor who has both healthy patients and sick patients waiting in line, with the relative fractions of 80% and 20%. Healthy patients take on average 5 minutes per visit, sick ones take one hour, with the actual durations distributed exponentially. How many times would the doctor's door open during a period of half an hour?
 A: The distribution of waiting times you describe is a hyperexponential distribution. See the Wikipedia entry for details. 

each $Y_i$ is an exponentially distributed random variable with rate parameter $\lambda_i$, and $p_i$ is the probability that $X$ will take on the form of the exponential distribution with rate $\lambda_i$

The expected value of wait time is simply:
$$E[X]=\sum_{i=1}^n \tfrac{p_i}{\lambda_i}$$ 
In your example, the average waiting time is $\tfrac{0.8}{1/5}+\tfrac{0.2}{1/60}=16$ minutes. The expected number of patients in a half-hour is $30/16=1.875$
Edit: I believe the final calculation for the expected number of patients per half-hour is correct for a random half-hour period but not necessarily the first half-hour. That is, if we look at a random half-hour period throughout the day it will work, but if we look at the first half-hour when the first patient arrives, or if we're assuming a patient arrives right at the beginning of the half-hour, then the answer will be different. This is because the hyperexponential distribution does not exhibit the memoryless property.
