# Chance of failure of a machine in a year - Probability ?(Interview Question)

A machine has 3 components say A,B,C and at any given day chance of failure of any of them is 1%. The machine doesn't work if any of the component fails. So the machine doesn't work if either 1 / 2 / all of the components fail. Calculate

1. In the worst case scenario how many days the machine doesn't work in a year.
2. In the best case scenario how many days the machine doesn't work in a year.
• I think this needs clarifying. Worst case is it never works, best case is it always works, no? – lulu Jul 27 '15 at 23:06
• Is the worst expected case when only one part fails fails each time? Best expected case: all three fail together? (I don't think independence can be assumed) – Marconius Jul 27 '15 at 23:11
• Also, we need to know something of your background, which might be illustrated by showing us something you have tried and why you're unsure of your solution. – BruceET Jul 27 '15 at 23:12

## 2 Answers

As the comments mentioned the worst case scenario is it never works, best case is it works every day.

Some information that may be of interest:

Let $A$ be the event that $A$ works (thus $A^c$ means it does not work), and $M$ be that the machine works (define similarly for $B,C$).

Assuming $A,B,$ and $C$ are independent, on any given day the chance the machine doesn't work is (this formula comes from the fact that if you add the probabilities you are double counting when 2 of them don't work, and when you subtract those away, you double count the time when all 3 don't work):

\begin{align} P(M^c) & = {P(A^c)+P(B^c)+P(C^c)-P(A^c)P(B^c)-P(B^c)P(C^c)-P(A^c)P(C^c)+P(A)P(B)P(C)} \\[1ex] & =0.03-0.0003+0.000001 \\[1ex] & = 0.029701 \\[3ex] & = 1-P(A)P(B)P(C) \\[1ex] & = 1-0.99^3 \end{align}

Thus the expected number of times it doesn't work in a year is $365P(M^c)\approx 10.{\tiny8}$days.

From here you can give confidence intervals, say with confidence $p=.01$ (or .05), that the machine will not work some number of days in the range $(x_{min},x_{max})$ out of the year with probability $1-p$, where $x_{min}$ and $x_{max}$ are some number of days (probably around 5-20 (this is what I would expect to be a reasonable answer), depending on the required level of confidence).

Perhaps the interviewer wanted you to recognize that anything could happen, but with whatever certainty you decide it will be in the range given.

In the worst case, the machine does not work $365{\tiny .25}$ days in the year. At least one component fails every day, which has probability $(1 - 0.99^3)^{356.25} = 1.5\times 10^{-558}$

In the best case, the machine does not work $0$ days in the year. No component fails on any day, which has probability $0.99^{3\cdot365.25} = 1.6\times 10^{-5}$

On the average case, the machine does not work $365.25\cdot (1-0.99^3)= 10{\tiny .8}$ days in the year.