Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Here's a question we got for homework:

It is given that at a certain bank there's 50-50 chance that when you
enter there's:

 - no one waiting in line 
 - there's one man waiting, in which case the waiting time is
   exponentially distributed. 

What is the CDF of the total waiting tine?

Let X be the total waiting time, Y the number of people waiting.
For x>=0, use the total probability theorem for the CDF of X
Notice that X is not discrete nor continuous, but a mix of both.

Here's what I thought. As specified, Y can be either 0 or 1 people waiting. If there's no one waiting the waiting time is 0 which means P(X<=x) = 1 for all x>=0. If there's one man waiting then P(X<=x) = 1 − e^(−λx).

So, by the law of total probability,

P(X<=x) = P(X<=x|Y=1)P(Y=1) + P(X<=x|Y=0)P(Y=0)

Am I right so far? If I am right, then what is P(X<=x|Y=1)? Are the two variables independent?


share|cite|improve this question
You have said what it is! Recall that you wrote that if there's one man waiting, then $P(X \le x)=1-e^{-\lambda x}$. – André Nicolas Dec 17 '11 at 13:14
up vote 3 down vote accepted

Yes, you are right so far.

As you explained yourself, $P(X\leq x\mid Y=1)$ is the distribution function of the exponential distribution, so $$P(X\leq x\mid Y=1)=1 − e^{−\lambda x}.$$

$P(X\leq x\mid Y=0)$ looks differently: Since there is no line, the waiting time is zero and therefore $$P(X\leq x\mid Y=0)=1_{[0,\infty)}(x).$$

The two variables are certainly not independent. Otherwise, we would necessarily have $$P(X\leq x\mid Y=1)=P(X\leq x\mid Y=0),$$ which as we have seen is not the case.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.