# Show that $P(N \geq n) = (1-e^{-\lambda})^n/ \lambda^n$

The lifetime $$X$$ (in days) of a device has an exponential distribution with parameter $$\lambda.$$ Moreover, the fraction of time which the device is used each day has a uniform distribution over the interval $$[0,1],$$ independent from one day to the other. Let $$N$$ be the number of complete days during which the device is in a working state.

(a) Show that $$P[N\geq n]=(1-e^{-\lambda})^n/\lambda^n,$$ for $$1,2,\dots$$

Also,

(b) $$E(N \mid N \leq 2 )$$

### Attempt:

I believe the trick here is the law of total probability

$$P(N \geq n) = \int_0^{\infty} P(N \geq n \mid X \leq x) f_X(x) dx$$

My trouble is in computing $$P(N \geq n \mid X \leq x)$$. Im having difficulties on this part. How can we interpret it?

As for b), once we show a), we can just use the fact that $$E(X) = \sum P(X > x)$$. To see that

$$E(N \leq N \leq 2) = \sum_{n=1}^2 P(N \geq n) = \frac{1-e^{-\lambda}}{\lambda} + \frac{(1-e^{-\lambda})^2}{\lambda^2}$$

am I on the right track so far?

• Sorry but you are rather far from the solution (and I am not sure to understand what you think you are doing). Why not take seriously what is said in the text of the exercise? Hence, start from the fact that, for every $n$, $N\geqslant n$ iff $X\geqslant\sum\limits_{k=1}^nU_k$ for some $(U_k)$ i.i.d. uniform on $(0,1)$. Now, $P(X\geqslant x)=e^{-\lambda x}$ for every $x>0$ hence, by independence of $(U_k)$ from $X$, and by independence of $(U_k)$, $$P(N\geqslant n)=E\left(\exp\left(-\lambda\sum_{k=1}^nU_k\right)\right)=E(e^{-\lambda U})^n=\cdots$$ – Did Jan 28 at 16:38
• @Did so U_k is the fraction of time that device works during the day the kth day correct ? – Mikey Spivak Jan 28 at 16:54
• Yes, the fraction of time during which the device is used on day k. – Did Jan 28 at 17:00
• I dont understand yet why $P(N \geq n$ equals the expectation of the exponentials – Mikey Spivak Jan 28 at 17:47
• Well... how to say that... this (a principle) is exactly what my first comment explains. – Did Jan 31 at 16:08