# Expected lifetime of system that fails with probability $p$ per week

If the probability that a given system fails in a week is p, what is the expected lifetime of the system?

I have no clue how to approach this. I have been thinking about this for a while now. Basically I wanted to find out, if my laptop fails in a year with a low probability say 1/100, what is its expected lifetime? How do I compute the expected lifetime here? Is the data insufficient to answer this? I don't know how to approach this. I hope the question makes sense.

-
Google "Geometric random variable". –  David Mitra Mar 23 '12 at 18:11
The expected number of failures per week is $p$. Expectations are additive, so you expect $np$ failures after $n$ weeks, and so the number of weeks you need to wait to expect one failure is $1/p$. This is the expected lifetime of the system. –  MJD Mar 23 '12 at 18:12
Thanks a lot. I'll look into it. –  Ragavan N Mar 23 '12 at 18:12
There are several hidden assumptions in your problem. The model mentioned by David Mitra assumes that the failure probability is constant, which is not true for many real-life systems: the older the system, the higher the probability that it will fail during the next week, month, year, etc. Also look for information on hazard rates. –  Dilip Sarwate Mar 23 '12 at 18:16
Different components age in different ways, so the problem is quite complex. We can use a primitive exponential distribution model. But even if the probability that your new laptop fails in a year or less is $1/100$, I am confident it will be dead in $25$ years or less, something very different from what the exponential model would suggest. –  André Nicolas Mar 23 '12 at 18:29

The expected number of failures per week is $p$. Expectations are additive, so you expect $np$ failures after $n$ weeks, and so the number of weeks you need to wait to expect one failure is $1/p$. This is the expected lifetime of the system.

You can add up $\sum_1^\infty np(1-p)^{n-1}$ as Emre suggested, but you will just get $1/p$ anyway.

-

The probability that it fails on the $n$'th week is that it does not fail in $n-1$ weeks then fails. Call this $P_n=p(1-p)^{n-1}$. The expected lifetime is therefore $\sum_{n=1}^\infty n P_n$. You can take it from there...

-

The probability that the system survives for exactly $n$ periods is $(1-p)^{n-1}p$. So the expected lifetime is $\sum_{n=1}^\infty n(1-p)^{n-1}p$. Call this value $E$ (in principle, we would have to check that the series converges). Now with probability $p$ the system fails in the first round and with probability $(1-p)$ we are in the same situation as originally but one round later. So we have $E=p+(1-p)(E+1)$. Solving this gives you $E=1/p$.

-

The answer depends strongly on context. If this is a routine homework exercise, then one assumes, possibly without explicitly saying so, that the probability the thing dies in the next second is independent of how long it has lived.

Under that extremely dubious assumption, the length of life $T$ of the laptop has exponential distribution. For $t \ge 0$, the probability that $T > t$ is $e^{-\lambda t}$, where $\lambda$ is a constant.

If you know, for example, that the probability of surviving at least $1$ year is $\frac{99}{100}$, then we can compute $\lambda$.

It turns out that the expected lifetime is $\frac{1}{\lambda}$, so once we have found $\lambda$, the expected lifetime is immediate. In our case we get about $99.5$ (years!).

However, the above model is not realistic if you are thinking of actual laptops. A new laptop has a fair probability of early death. If it survives for a few hours, the exponential distribution model gives, for a while, a fairly good fit. But in the long run, the exponential model fits very badly.

The exponential model is a model under which there is death but no aging. This model describes radioactive decay very well. But laptop components age, in various ways that are component-dependent. For example, the battery will almost certainly not hold a charge $5$ years from now.

The exponential model will predict a mean lifetime that is probably greater than the truth by a substantial factor. More plainly put, it will give an answer that is way off.

There is real information available about mean lifetime of laptops. It comes from concrete data, not a mathematical model. One can find good mathematical models of lifetime, particularly at the component level. But the exponential distribution, or its discrete cousin the geometric distribution, are not suitable, though they are not too bad at the lowest level, for example, in the old days, at the transistor level.

-