A magician has 24 fair coins, and 1 trick coin that flips heads every time.
Someone robs the magician of one of his coins, and flips it $k$ times to check if it's the trick coin.
A) What is the probability that the coin the robber has is the trick coin, given that it flips heads all $k$ times?
B) What is the smallest number of times they need to flip the coin to believe there is at least a 90% chance they have the trick coin, given that it flips heads on each of the flips?
Here is my approach:
Let $T$ be the event that the robber has the trick coin
Let $H$ be the event where the robber flips a heads k times in a row
$Pr(T) = 1/25$
$Pr(H|T) = 1$
$Pr(T') = 24/25$
$Pr(H|T') = 1/2$ when $k=1$, $1/4$ when $k=2$, $1/8$ when $k=3$... etc
$Pr(T|H) = (1 * 1/2) / (1 * 1/2 + Pr(H|T') * 24/25) = 1/13, 1/7, 1/4,...$ etc
So the Pr(T|H) answer changes for every k, do I answer with the formula? How can I answer A? How do I make a probability distribution when k can be infinite?
Also is B 8 flips? Since when k = 8, Pr(T|H) = 1/256.
Thanks for any help.
It might be more handsome to let $H_k$ denote the event that the stolen coin will give $k$ heads by the first $k$ flips.
A) To be found is $P(T\mid H_k)$ where:$$P(T\mid H_k)P(H_k)=P(T\cap H_k)=P(H_k\mid T)P(T)\tag1$$
You already found values for $P(H_k\mid T)$ and $P(T)$ so $(1)$ allows you to find $P(T\mid H_k)$ if you can find $P(H_k)$. This can be done on base of:$$P(H_k)=P(H_k\mid T)P(T)+P(H_k\mid T^{\complement})P(T^{\complement})$$ Again $P(H_k\mid T)$ and $P(T)$ are well known and of course $P(T^{\complement})=1-P(T)$. Finally it is quite evident that $P(H_k\mid T^{\complement})=2^{-k}$.
B) So you end up with an expression in $k$ for $P(T\mid H_k)$ and to be found is the smallest $k$ that satisfies:$$P(T\mid H_k)\geq0.9$$