0
$\begingroup$

Background:

So today I visit a booth at my college giving free gifts. Since the gifts are alluring, many students queue besides the booth.

Question:

Assume there are $m$ gifts left. Everyone have a $0

1 Answers 1

1

If $k \leq m$, the probability of success is just $n$.

If $k>m$,

Suppose you are at position $k$, ask the $k-1$ people in front of you to toss a coin, those coin has the probability of being head with probability $n$. If they obtain head in their coin toss, give them the gift (while stock lasts).

Hence out of these $k-1$ people, we can afford $m-1$ heads at most so that we have a chance to get a prize. Also, we need to toss a head as well.

Hence the probability of winning is

$$\sum_{i=0}^{m-1}\begin{pmatrix} k-1 \\ i\end{pmatrix}n^i(1-n)^{k-1-i}n$$

Hence, we have to solve for $k$ that satisfies

$$\sum_{i=0}^{m-1}\begin{pmatrix} k-1 \\ i\end{pmatrix}n^{i}(1-n)^{k-1-i}n>p$$

$$\sum_{i=0}^{m-1}\begin{pmatrix} k-1 \\ i\end{pmatrix}n^{i}(1-n)^{k-1-i}>\frac{p}{n}$$

  • 0
    Thank you for your answer. Are we going for numerical approach solving the last equation, if $k,m,n,p$ are given?2017-01-09
  • 0
    If $p, n, m$ are given, I will compute $\frac{p}n$, then I will just check the cdf of binomial distribution with $k-1$ trials, up to $m-1$ success with success probabibility $n$.2017-01-09