# Biased coin probability

1) Biased coin flipped twice. There is 6/9 probability that the coin will land heads for at least one of the two flips. What is the smallest number of times that I can flip the coin for at least 99% certainty that it will land heads at least once?

My answer: $n\left(\dfrac{6}{9}\right)^2 = .99 \Rightarrow n = 2.227$ so at least 3 flips

2) Biased coin lands head w/ probability p and start with empty urn. Flip coin n times. each time coin lands head, blue ball into urn. Each time it lands tail, green ball in urn. After finishing flipping the coin, draw k balls from urn one at a time. Replacing each ball you draw before drawing another. If all the k balls you drew are blue, what is the probability that all n balls in the urn are blue?

My answer: I am assuming it is in .99 to 1 range, because since all the balls drawn are blue, it is hard to know the probability for the green ball.

• Do not attempt to deface your own question. As you can see, it's pointless anyway, because the original content can always be recovered. – heropup Jun 25 '14 at 18:03

Question 1. If $X$ is a random variable that counts the number of heads obtained in $n = 2$ coin flips, then we are given $\Pr[X \ge 1] = 2/3$, or equivalently, $\Pr[X = 0] = 1/3 = (1-p)^2$, where $p$ is the individual probability of observing heads for a single coin flip. Therefore, $p = 1 - 1/\sqrt{3}$.

Next, let $N$ be a random variable that represents the number of coin flips needed to observe the first head; thus $N \sim {\rm Geometric}(p)$, and we need to find the smallest positive integer $k$ such that $\Pr[N \le k] \ge 0.99$. Since $\Pr[N = k] = p(1-p)^{k-1}$, I leave the remainder of the solution to you as an exercise; suffice it to say, you will definitely need more than 3 coin flips.

Question 2. Your answer obviously must be a function of $p$, $n$, and $k$. It is not possible to give a numeric answer. Clearly, $X \sim {\rm Binomial}(n,p)$ represents the number of blue balls in the urn, and $n-X$ the number of green balls.

Next, let $Y$ be the number of blue balls drawn from the urn out of $k$ trials with replacement. Then $Y \mid X \sim {\rm Binomial}(k,X/n)$. You want to determine $$\Pr[X = n \mid Y = k] = \frac{\Pr[Y = k \mid X = n]\Pr[X = n]}{\Pr[Y = k]}.$$ It is trivial to see that $\Pr[Y = k \mid X = n] = 1$, and $\Pr[X = n] = p^n$. The denominator is the tricky part: You need to write $$\Pr[Y = k] = \sum_{x=0}^n \Pr[Y = k \mid X = x]\Pr[X = x],$$ by the law of total probability. Again, I leave the remainder of the solution for you to work out.

• I am getting k to be a less than 3. 2/sqrt(3)*(1-1/sqrt(3))^(k-1)=.99 -> k = 1.178. What am I doing wrong? and thank you so much for your help – myth4ks Jun 20 '14 at 7:29
• $$\Pr[N \le k] = \sum_{j=1}^k \Pr[N = j] = 1 - (1-p)^k.$$ Now substitute and solve. – heropup Jun 20 '14 at 7:36
• I am sorry, but can you explain Pr[Y=k∣X=n]=1 and the denominator Pr[Y=k] on how you got those – myth4ks Jun 20 '14 at 8:01
• $X$ counts the number of blue balls in the urn. $Y$ counts the number of blue balls drawn from the urn in $k$ trials. So, given that all the balls in the urn are blue, what is the probability that you will always draw a blue ball? – heropup Jun 20 '14 at 8:03
• The probability is 1, since it only blue balls were only drew. – myth4ks Jun 20 '14 at 8:18