10 Coins Cracker
Goldman Sachs
You have 10 coins. probability of getting head for the first coin is 1/3, second 1/5, third, 1/7 and so on. What is the probability of getting odd number of heads?
Answer
You are given seemingly complex dynamic (lot of distinct scenarios that need to be evaluated separately) and are asked for the result when there's 10 coins. This should give you a cue to try and see what happens if you had a small number of coins instead, and see if you can recognise the pattern.
With one coin, you only get odd number of heads if you have only one head. The chance is $\frac{1}{3}$ for the first coin so your answer is $p_1=\frac{1}{3}$. With two coins, we also get an odd number only if one of them is a H. So we can have TH with probability $\frac{2}{3}\frac{1}{5}$ or HT with probability $\frac{1}{3}\frac{4}{5}$. The total chance is therefore $$p_2 =\frac{2}{3}\frac{1}{5}+\frac{1}{3}\frac{4}{5}=\frac{2}{5}$$
With 3 coins, we can either have 1H or all 3H, with probability: $$p_3 = \frac{2}{3}\frac{4}{5}\frac{1}{7} + \frac{2}{3}\frac{1}{5}\frac{6}{7} + \frac{1}{3}\frac{4}{5}\frac{6}{7} + \frac{1}{3}\frac{1}{5}\frac{1}{7} = \frac{3}{7}$$We can notice a pattern of how it evolves from n-1 to n. It seems that: $$p_n = p_{n-1}\frac{2n}{2n+1} + (1-p_{n-1})\frac{1}{2n+1}$$Easiest way to solve this is to guess a solution and see if it holds up under induction. Looking at the solutions we have so far, $p_1=\frac{1}{3}$, $p_2 = \frac{2}{5}$, $p_3=\frac{3}{7}$ - it looks like $p_n = \frac{n}{2n+1}$. We know this is true for $p_1$, so let's see if we can show that it's true for $n$ if true for $n-1$. Assuming it holds for $n-1$, then $p_{n-1}=\frac{n-1}{2n-1}$. Given the relation we found between $p_{n-1}$ and $p_n$, we substitute:$$p_n = \frac{2n}{2n+1}\frac{n-1}{2n-1} + \frac{1}{2n+1}\frac{n}{2n-1}=$$ $$\frac{n(2n-1)}{(2n-1)(2n+1)}=\frac{n}{2n+1}$$This is exactly what we wanted to show: the form $p_n=\frac{n}{2n+1}$ holds for 0, and if it holds for $n-1$ it holds for $n$. By induction, the form is correct. To get the answer for $n=10$, simply substitute $p_{10} = \frac{10}{21}$.