# Probability question relating to probability mass functions and negative binomial distribution (I believe)

The purchaser of a power-generating unit requires c consecutive successful start-ups before the unit will be accepted. Assume that the out- comes of individual start-ups are independent of one another. Let p denote the probability that any particular start-up is successful. The random variable of interest is X = the number of start- ups that must be made prior to acceptance. Give the pmf of X for the case c = 2. If p = .9, what is P(X≤ 8)? [Hint: For x ≥ 5, express p(x) “recursively” in terms of the pmf evaluated at the smaller values x-3, x-4, ... , 2.]

I was unsure how to find the pmf for this question but attempted to solve the second part by summing P(2) + P(3).... P(8) using negative binomial distribution with the formula: [(x+r-1)C(r-1)]p^(r)(1-p)^(x), with x being number of failure and r being number of successes. I got the answer 0.99999927, but the answer in the textbook is 0.99950841.

Negative binomial distribution is not applicable here. It calculates probability to get $$x+r$$ trials until total number of successes reach $$r$$. And there successes need not to be consecutive. And you are interested in $$c$$ consecutive successes. So your trials must ended with $$c$$ successes. Say, for

$$x=2$$: only $$(SS)$$ is valid,

$$x=3$$: only $$(FSS)$$,

$$x=4$$: either $$(SFSS)$$ or $$(FFSS)$$,

$$x=5$$: $$(FFFSS)$$ or $$(FSFSS)$$ or $$(SFFSS)$$

and so on. Note that before two last successes you must get failure. So for $$x$$ trials the last three places are occupied and the previous $$x-3$$ places are those that experiment cannot be finished earlier: $$P(x)=\mathbb P(\underbrace{**\ldots*}_{x-3}FSS) =(1-P(2)-\ldots-P(x-3))\cdot (1-p)p^2.$$ Here $$1-P(2)-\ldots-P(x-3)$$ is the probability that the first $$x-3$$ trials do not contain two consecutive successes and experiment was not finished for $$x-3$$ trials or earlier.

So $$P(2)=p^2$$, $$P(3)=(1-p)p^2=P(4)$$, $$P(5)=(1-P(2))\cdot(1-p)p^2,$$ $$P(6)=(1-P(2)-P(3))\cdot(1-p)p^2,$$ $$P(7)=(1-P(2)-P(3)-P(4))\cdot(1-p)p^2,$$ $$P(8)=(1-P(2)-P(3)-P(4)-P(5))\cdot(1-p)p^2.$$