# Probability of Failure Question

We have a machine carrying out tasks. The first task, it fails with probability $0.1$ After that, if it succeeds, it fails the next task with probability $0.1$ If it fails, it fails the next task again with $0.9$ probability. How do we calculate the probability that the $j-$th task fails, given that some $i$ less than $j$ doesn't fail? I have the probability that the nth task fails, which I proved via induction.

Prob nth fails : $\frac{1}{2}\times(1-(\frac{4}{5})^n)$ First task fails: .1

Task fails after success: $0.1$

Task succeeds after success: $0.9$

Fails after fail: $0.9$

Succeeds after fail: $0.1$

• How about a flow-chart or tree to describe the process? – user99680 Nov 18 '13 at 5:39
• What are the rules for the rest of the tasks? What happens if it fails the first time? – XYZT Nov 18 '13 at 5:39
• I hope that helped! – user82004 Nov 18 '13 at 5:42
• Just hints please! – user82004 Nov 18 '13 at 5:58
• @LeilaHatami And yet another useless edit to a 3+ years old question. Well done. – Did Mar 20 '17 at 16:28

## 1 Answer

Answer:

A quick observation of running numbers for $n = 3$ and $n = 4$ reveal that

No of ways 2 and less successes could fit for $j = 3$ is $2^2 = 4$ ways and similarly, the number of ways 3 or less successes could fit for $j = 4$ is $2^3 = 8$ ways.

With this said, we are going to count the number of times there are flips (by which I mean a success to failure and a failure to success) within these events. Besides the first task, every time there is a flip, the successive task has a probability of $0.1$, and every time there is no flip, the successive task has a probability of $0.9$. The count of flips follows a binomial distribution of terms.

For $n = 3$,

No of flips; Total; Starting state

0 ; 1; Failure

1 ; 2; Success

2 ; 1; Failure

For $n = 4$

No of flips; Total; Starting State

0 ; 1; Failure

1 ; 3; Success

2 ; 3; Failure

3 ; 1; Success

So it follows that the $2^{(n-1)}$ follows a binomial distribution with probability of failure $= 0.1$ and probability of success$= 0.9$ such as this

For $n = 4$

$^{3}C_{0}(0.1)(0.9)^{3} + ^{3}C_{1}(0.9)(0.1)(0.9)^{2} + ^{3}C_{2}(0.1)(0.1)^{2}(0.9) + ^{3}C_{3}(0.9)(0.1)^{3}$

In other words for $^{(n-1)}C_{i}(p^{i})*(q^{(n-1-i)})$, the even terms are multiplied by 0.1 as they start with the state of Failure and the odd terms are multiplied by 0.9 as they start with the state of Success.

Extending it to any n,

Sum of Even terms = $1/2*[(.0.1+0.9)^{(n-1)}+(0.9-0.1)^{(n-1)}]*(.1)$

= $1/2*[1+(0.8)^{(n-1)}]*0.1$

Sum of Odd terms = $1/2*[(0.1+0.9)^{(n-1)} - (0.9-0.1)^{(n-1)}]*(.9)$

= $1/2*[1-(0.8)^{(n-1)}]*0.9$

Adding these two:

Required Probability = $1/2*[0.1+0.9] + 1/2*[0.8^{(n-1)}*(0.1 - 0.9)]$

= $1/2 - 1/2*[0.8^{n}]$

= $1/2*[1-(4/5)^{n}]$

Hope this answers your question in addition to your induction proof.

I know that the formatting is not good, I am hoping that someone would format it well.