Bernoulli's trial and the number of times it takes to pass a test?

53 Views Asked by At

I am a bit confused with how this works, since I have an answer, but it is different from the answer key.

So, lets say we are allowed to take a test as many times we want until we pass, the probability of passing is 0.8 and failing is 0.2. Hence this can be seen as a generating function that is infinite, but converges.

My answer was this $$(0.8)[1 + (0.2)^1 + (0.2)^2+.....]$$ where we fail zero times, one times, two times, and so on until infinity. However, the answer key has this $$(0.8)[1 + 2(0.2)^1 + 3(0.2)^2+.....]$$ Why are we multiplying it by those numbers..? So if for example we failed once it would be 0.2, why would we have to multiply that single failure by 2? Same thing for two failures, why do we have to multiply it by 3..?

EDIT: How many times can we expect to take a test until we pass it given that passing is 0.8 and failing is 0.2? Answer is 1.25 times simplified.

1

There are 1 best solutions below

2
On BEST ANSWER

We wish to evaluate the expected value of the number of times it takes to pass the test (denote by $N$) which is given by $$\mathbb{E}(N)=\sum_{n=1}^\infty n(0.8)(0.2)^{n-1}$$ So for $n-1$ failures, you need to take the test $n$ times, and the probability of this occurring is $(0.8)(0.2)^{n-1}$.

As for evaluating the answer, note that $$[1 + 2(0.2)^1 + 3(0.2)^2+.....]$$ is the first derivative of a sum to infinity of a geometric series, where the ratio $r$ is $0.2$, and so will equal $$\frac{d}{dr}\frac{1}{1-r}=\frac{1}{(1-r)^2}=1.5625$$ so that $$\mathbb{E}(N)=0.8\times1.5625=1.25$$