find $p$ that maximizes $P[X = 10]$ where $X$ is the total number of attempts.

53 Views Asked by At

Suppose we keep tossing a coin until we see $4$ heads, and suppose that the probability of seeing a head on each toss is an unknown value $p$. If we actually perform this experiment and get the fourth head on the $10$th toss, what is the value of $p$ that maximizes the chance of what we obtained? (that is, find $p$ that maximizes $P[X = 10]$ where $X$ is the total number of attempts.)

My attempt:

We can write $P[X=10] = \sum \binom{X}{k} p^k (1-p)^{10-k}$

Buy how to continue from here to find $p$?

2

There are 2 best solutions below

0
On

If you get the fourth head on the $10$th toss this means that there were exactly $3$ heads in the first $9$ tosses. So $$ P(X=10)=\binom{9}{3}p^4(1-p)^6 \quad 0\leq p\le1 $$ The goal is to maximize this probability (note that is a function of $p$ and can be maximized using calculus for example).

0
On

The probability you need $n$ independent trials to get exactly 4 successes is a Negative Binomial

$$\mathbb{P}[X=n]=\binom{n-1}{4-1}p^4(1-p)^{n-4}$$

Where $n=4,5,6,\dots$

In order to maximize it w.r.t. $p$ you can consider that the function to be maximized is

$$L \propto p^4(1-p)^6$$

... take its log

$$l=4\log p+ 6\log(1-p)$$

... take the derivative w.r.t. $p$

$$l^*=\frac{4}{p}-\frac{6}{1-p}$$

set it $=0$ and solve w.r.t. $p$ obtaining

$$\hat{p}=\frac{4}{10}$$