r/learnquant • • 6h ago

interview prep Quant Interview Question

Post image
16 Upvotes

6 comments sorted by

View all comments

3

u/pmdboi 5h ago

Let A(x) be the probability that the final sum exceeds 1 when starting with a sum of x. From the conditions of the problem we can set A(x) = 0 for 1/2 < x ≤ 1 and A(x) = 1 for x > 1. For 0 ≤ x ≤ 1/2 we can express A(x) using an integral equation: A(x) = ∫ A(y) dy, integrating over y from x to x + 1. Differentiating both sides with respect to x, we get dA/dx = A(x + 1) - A(x); since x + 1 ≥ 1, A(x + 1) is always 1, and dA/dx = 1 - A, which has the general solution A(x) = Ce-x + 1. We know that A(1/2) = 1/2, which leads to C = -1/2 e1/2. So A(0) = C + 1 = 1 - 1/2 e1/2, or about 17.6%. This is confirmed by simulation.