A random variable that is a mix of discrete and continuous

#1
Here's a question we got for homework:

PHP:
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?

Instruction:
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?

Thanks!
 

BGM

TS Contributor
#2
Yes they are independent and the approach is rigorous. However you just need to note that there is a point mass at 0 (which correspond to a jump from 0 to 1/2 in the CDF) and the remaining part increase from 1/2 to 1 like an exponential CDF.

Try to split into 3 cases: x < 0, x = 0, x > 0