4

There are k+1 coins in a box. When flipped, the $i$th coin will turn up heads with probability $\frac{i}{k} , i=0,1,...,k$.
A coin is randomly selected and is then repeatedly flipped. If the first $n$ flips all result in heads, what is the conditional probability that the $(n+1)$ flip will do likewise?

My attempt:

Let $A_i$ is the $i$th coin is tossed and $H_n$is the $n$th coin is head

So our given condition show that $\Bbb P(H_1|A_i)=\frac{i}{k}$.

We want to compute $\Bbb P(H_{n+1}|\bigcap_{i=1}^{n}H_i)$.

At this moment, I cannot proceed next stage.
How to calculate above conditional probability?

fivestar
  • 919
  • if there are k + 1 coins in the box, then how do the 'k + 2' different values of i relate to the coin - example k = 1, therefore 2 coins, i = 0,1,2 - what does that mean? – Cato Sep 27 '18 at 14:26
  • does it mean 0,1,......k - what does it say exactly in the question, or am I confused? – Cato Sep 27 '18 at 14:32
  • Please edit your post for clarity. There are $k+2$ numbers included in $0, \cdots, k+1$. – lulu Sep 27 '18 at 14:38
  • anyway - seems to me you need to find the prob that the coin is 'k' given that there were n heads, for each k – Cato Sep 27 '18 at 15:01

2 Answers2

3

In addition, let $Z_n$ be the even that the first $n$ flips are all heads, then we are interested in $P(H_{n+1} \vert Z_n)$, which is given as follows \begin{equation} P(H_{n+1} \vert Z_n) = \sum_{i=0}^n P(H_{n+1} \vert Z_n A_i)P(A_i \vert Z_n) \tag{1} \end{equation} Assuming that the flipping trials are independent conditioning on the $i^{th}$ coin being the chosen one, then \begin{equation} P(H_{n+1} \vert Z_n A_i) = \frac{i}{k} \end{equation} Using Bayes theorem, we can say \begin{equation} P(A_i \vert Z_n) = \frac{P(Z_n \vert A_i)P(A_i)}{P(Z_n)} = \frac{\frac{1}{k+1}(\frac{i}{k})^n}{\frac{1}{k+1}\sum_{j=0}^k (\frac{j}{k})^n} = \frac{(\frac{i}{k})^n}{\sum_{j=0}^k (\frac{j}{k})^n} \end{equation} Replacing in $(1)$, we get \begin{equation} P(H_{n+1} \vert Z_n) = \sum_{i=0}^n P(H_{n+1} \vert Z_n A_i)P(A_i \vert Z_n) = \sum_{i=0}^n \frac{i}{k}\frac{(\frac{i}{k})^n}{\sum_{j=0}^k (\frac{j}{k})^n} = \frac{\sum_{i=0}^k (\frac{i}{k})^{n+1}}{\sum_{i=0}^k (\frac{i}{k})^n} \tag{2} \end{equation} and we're done.


For large $k$

As $k \rightarrow \infty$, the sum becomes an integral, therefore \begin{equation} \lim_{k \rightarrow \infty} = \frac{1}{k} \sum_{i=0}^k (\frac{i}{k})^{\beta} = \int_0^1 x^\beta \ dx = \frac{1}{1+\beta} \end{equation} For $\beta = n+1$ in the numerator of $(2)$ and $\beta=n$ for the denominator in $(2)$, we get \begin{equation} P(H_{n+1} \vert Z_n) = \frac{n+1}{n+2} \end{equation}

As $n \rightarrow \infty$, we can see that the probability becomes $1$, which is intuitive.

Ahmad Bazzi
  • 12,076
1

A=coin is i

B = there were n heads

$$P(A|B) = \frac{\frac{1}{k + 1} (\frac{i}{k})^n}{\frac{1}{k+1}(\frac{0}{k})^n + \frac{1}{k+1}(\frac{1}{k})^n + ... + \frac{1}{k+1}(\frac{k}{k})^n} $$

$$ = \frac{(\frac{i}{k})^n}{(\frac{0}{k})^n + (\frac{1}{k})^n + ... + (\frac{k}{k})^n} $$

$$ = \frac{i^n}{0^n + 1^n + ... + k^n} $$

note that if you summed that for each i, you'd get 1, because the coin has to be one of them

P(head on next toss)

$$ = (\frac{0}{k} P(coin = 0) + \frac{1}{k} P(coin = 1) + ... + \frac{k}{k} P(coin = k) $$

$$ = \frac{(\frac{0}{k} 0^n + \frac{1}{k} 1^n + ... + \frac{k}{k} k^n)}{0^n + 1^n + ... + k^n}$$

$$ = \frac{1}{k}\frac{(0^n + 1.1^n + 2.2^n + .... + k k^n}{0^n + 1^n + ... + k^n}$$

$$ = \frac{1}{k}\frac{(0^{n + 1} + 1^{n + 1} + 2^{n+1} + .... + k^{n+1}}{0^n + 1^n + ... + k^n}$$

Cato
  • 1,433