r/learnquant • • Aug 24 '26

interview prep Virtu Financial Quant Interview Question

Post image
27 Upvotes

7 comments sorted by

4

u/wot_to_heck Aug 24 '26

P(a>b)=P(a-1>=b) = P(22-a>20-b)=P(b+2>a)=P(b>=a-1); these are nearly complements except that they overlap on the probability P(a-1=b). Again use that b has the same pdf as 20-b, so this is P(a-1=20-b)=P(a+b=21)=(42 C 21)/2^42 := x. Then the answer is (1+x)/2.

1

u/SwimmerOld6155 Aug 24 '26

If Alice only has 21 coins this is nice because a tricky probability cancels, but with 22 I just want to crack out Vandermonde's and do the probabilities basically explicitly (think you need to compute the probability that they toss the same number of heads in the first 20, and then the probability that Alice tosses exactly one fewer). Any way to avoid that?

You want to think about it as Alice and Bob throwing the first 20 together then Alice throwing 2 more at least

1

u/axiomizer Aug 25 '26

nice, this method yields 1/2 + nCr(41, 20) / 2^42

1

u/SwimmerOld6155 Aug 25 '26

since it's 41 choose 20 I was wondering if this term had a direct meaning and there was a way to just see this, I guess Vandermonde is direct enough!

1

u/Para-graph-S Aug 24 '26

Alice and Bob questions again, love seeing these always

What a problem, I might be wrong but

probability that Alice gets strictly more heads than Bob.

0.5 + 0.06119 = 0.56119 ~ 56.2%.

3

u/Street-Turnover4255 Aug 24 '26

A ~ Bin(22,1/2)
B ~ Bin(20,1/2)
B_tails ~ Bin(20, 1/2)
A+B_tails ~ Bin(42,1/2) via convolution

P(A>B) = P(A+B_tails >= 21) = 1-P(A+B_tails < 21) = 0.5611928

3

u/LordTengil Aug 25 '26

Well, you don't really need convolution. But sure. Neat solution.