4

An experiment is repeated, and the first success occurs on the 8th attempt. What is the success probability for which this is most likely to happen?

So we want to find $p$ between $0$ and $1$ which maximizes $(1-p)^{7}p$. To do this we could take the derivative and find all the critical points:

$$(1-p)^7 - 7(1-p)^6p = 0$$

But I don't know how to get the roots of this equation by hand. What can I do instead to solve this problem?

GoodDeeds
  • 11,185
  • 3
  • 22
  • 42
b_pcakes
  • 1,501
  • 5
    That is only the correct likelihood if it was determined before the experiment that there would be $8$ attempts. This is known as the "stopping condition." If the stopping condition is that you continue until you get a success, then you need a different likelihood. – Sean Lake Oct 10 '16 at 04:53
  • 8
    Try factoring out $(1-p)^6$ !!! – Ted Shifrin Oct 10 '16 at 04:53
  • @SeanLake Could you explain? – b_pcakes Oct 10 '16 at 05:02
  • If the number of trials is fixed and non-random, $N$, then the number of successes is binomially distributed: $P(n) = \frac{N!}{n!(N-n)!} p^n (1-p)^{N-n}.$ When the experiment is to continue until a success is acquired, then stop, the probability of different outcomes has to be different because $N$ is random then, too, and $n=1$ always. I don't know what the probability distribution is, so I just asked that question. – Sean Lake Oct 10 '16 at 05:05
  • 2
    @SeanLake The question implies that we continue until the first success. – Parcly Taxel Oct 10 '16 at 05:07
  • 1
    @SeanLake The question also implies that "first success is on the 8th attempt" is a random event that occurs with some probability, so it was not decided before the experiment began. I think the question makes sense as stated, and the attempt to solve it is correct, just not complete. – David K Oct 10 '16 at 05:10
  • 2
    @SeanLake It is a geometric distribution, not a binomial distribution – GoodDeeds Oct 10 '16 at 05:10
  • 1
    I disagree that the question was that clearly worded, but was wrong about the likelihood being wrong. The likelihood was correct as described by the geometric distribution. – Sean Lake Oct 10 '16 at 05:11
  • 2
    It doesn't matter how the experiment was supposed to be run. The likelihood is simply $\mathcal{P}(\text{observation}|\text{parameter})$, and our observation is the result of $8$ first trials, not "the number of first success was $8$ and something else happened after that" nor "there was one success in first $8$ trials (but the order is unspecified)". For our observation, the likelihood is $(1-p)^7 p$. It doesn't even matter if we intended to do $100$ trials but stopped after the $8$th trial because of a fire alarm. – JiK Oct 10 '16 at 07:53
  • 2
    As @JiK says, the issue of whether one stops after 8 trials, or a success, or whatever, is irrelevant (so long as it’s continued at least until a success or 8 trials). What is required is the assumption that the experiments are independent and identically distributed — which is to some extent implicit in describing it as “an experiment is repeated”. – Peter LeFanu Lumsdaine Oct 10 '16 at 10:21
  • This is a very bad question. It's impossible to know the success probability after only one success: for all you know it was a one-in-a-million chance and the experimenters got lucky on the 8th iteration. – Mason Wheeler Oct 10 '16 at 13:56

2 Answers2

12

Go ahead and solve for where the derivative is zero: $$(1-p)^7-7(1-p)^6p=0$$ $$(1-p)^6(1-p-7p)=0$$ $$(1-p)^6(1-8p)=0$$ $$1-p=0\text{ or }1-8p=0$$ $$p=1\text{ or }p=\frac18$$ We reject $p=1$ because then the experiment would succeed on the first try. $p=0$ can also be rejected for obvious reasons, so $p=\frac18$.

Parcly Taxel
  • 103,344
4

$$(1-p)^7-7(1-p)^6p=(1-p)^6(1-p-7p)=(1-p)^6(1-8p)$$ Thus, for extremum, $$(1-p)^6(1-8p)=0$$ $$p=1 \text{ or }p=\frac18$$

The boundary values are $p=0$ and $p=1$, both which constitute zero probability. Moreover, by the second derivative test, it can be seen that $p=\frac18$ is a point of maximum.

Hence, $$p=\frac18$$

GoodDeeds
  • 11,185
  • 3
  • 22
  • 42
  • (but the second derivative test is superfluous here -- the maximum must be either at $p=0$, $p=1/8$, or $p=1$, so as soon as you rule out $p=0$ and $p=1$, you're done) –  Oct 10 '16 at 07:38
  • @Hurkyl I agree, that was my intention of using "Moreover,..", to show that it is another way to get the same thing. – GoodDeeds Oct 10 '16 at 07:39