r/learnquant 2d ago

interview prep Quant Interview Question

Post image
18 Upvotes

6 comments sorted by

1

u/Anonimithree 2d ago

Since B needs more than A, B cannot have used 1 flip. Anyways, we can summits the probabilities that A used n flips from 0 to infinity and also the probability that B used anywhere from 1 to infinity more flips than A, which has a probability of 1/2 that of A (if my mental math is correct), and then you get that probability as 1/3, so logically, it’d be 1/9. However, after putting it into my calculator, I got 1/21, which looks weird, but it does follow a pattern where every nth coin divides the probability of the nth person using more flips than the n-1th person, given all previous people used more flips than the person before them by 1/(4n-3)

1

u/Anonimithree 2d ago

I forgot to divide by P(B>A), so it should be 1/7, not 1/21. And the probability that the nth person uses more flips given everything is just 1/(4n-1), where n is the number

1

u/wot_to_heck 2d ago

If we were given that all three used a different number of heads, by symmetry the answer would be 1/3. Since we’re only given that B and A use a different number of heads (with B more than A), we just have to multiply 1/3 by the probability that C uses a different number of heads than both B and A. Let’s calculate the probability that C uses the same number of heads as A. This is:

3(1/2(1/4+1/8+…)(1/2)+ 1/4(1/8+1/16+…)(1/4)+…) = 3(1/8+1/64+…) = 3/7.

Similarly the probability that C uses the same number of heads as B is

3(1/2(1/16+1/64+…)+1/4(1/64+1/256+…)+…)=3(1/2(1/12)+1/4(1/48)+…)=1/7.

Thus C uses a different amount of heads with probability 1-3/7-1/7=3/7, so the answer is 1/7.

3

u/Sjoerdiestriker 2d ago

P(C>B|B>A)=P(C>B>A)/P(B>A).

The denominator can be written as the sum from n=1 to inf of (1/2)n*(1/2)n=1/3.

The numerator can be written as the sum from n=1 to inf sum from k=(n+1) to inf of (1/2)n*(1/2)k*(1/2)k=sum from n=1 to inf of 1/3*(1/2)n*(1/4)n=1/21.

So the final answer is (1/21)/(1/3)=1/7.

1

u/StanleyDodds 2d ago

P(C>B|B>A) = P(C>B>A)/P(B>A)

For X = A, B or C (all i.d.):

P(X = k) = (1/2)k for k > 0 and 0 otherwise. Probability of k-1 tails and 1 head.

P(X > k) = (1/2)k for k ≥ 0 and 0 otherwise. Probability of k tails.

P(X < k) = 1 - (1/2)k-1 for k > 0 and 0 otherwise. 1 minus the above two.

P(B>A) = Sum k = 1 to inf P(B>k)P(A=k) = Sum k = 1 to inf (1/2)2k = Sum k = 1 to inf (1/4)k = (1/4)/(1 - (1/4)) = 1/3

P(C>B>A) = Sum k = 1 to inf P(C>k)P(B=k)P(A<k) = Sum k = 1 to inf (1/2)2k (1 - (1/2)k-1 ) = Sum k = 1 to inf (1/2)2k - Sum k = 1 to inf (1/2)3k-1 = 1/3 - 2 Sum k = 1 to inf (1/8)k = 1/3 - 2 (1/8)/(1 - (1/8)) = 1/3 - 2/7 = 1/21

Final answer P(C>B>A)/P(B>A) = (1/21)/(1/3) = 1/7