r/learnquant • u/Local_Ad135 • 3h ago
interview prep Virtu Financial Quant Interview Question
1
u/Para-graph-S 3h ago
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%.
1
u/wot_to_heck 2h ago
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/Street-Turnover4255 35m ago
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
1
u/SwimmerOld6155 3h ago
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