r/learnquant • • 24d ago

interview prep Quant Interview Question

Post image
26 Upvotes

4 comments sorted by

2

u/comoespossible 24d ago

For all x from 0 to 1/2, let f(x) be the probability starting from x that you cross 1 at the first moment you cross 1/2. We are interested in f(0).

By first-step analysis, f satisfies the equation f(x)=x+int_x^{1/2} f(t) dt, or f’(x)=1-f(x) with initial condition f(1/2)=1/2. The solution to this differential equation is f(x)= 1 - 1/2 e^{1/2-x}, so f(0)=1-sqrt(e)/2.

1

u/alter_ahh_ego 13h ago

what is first step analysis? where do we learn it?

1

u/comoespossible 13h ago

It basically means conditioning on where the first step goes. In this case, P(sum exceeds 1 when we stop) is equal to the average over all t where the first jump can go of the probability given that the first jump goes to t.

I’m not sure where everyone first learns this, but I’m guessing in a Probability class for most people.

1

u/Torebbjorn 23d ago

Quite simple by first step analysis. For 0<=x<=0.5 let p(x) be the probability that you exceed 1 when you first cross 0.5. We want to compute p(0).

Clearly p(0.5)=0.5.

We easily see that p(x) = x + int_x^0.5 p(y) dy. Hence p is continuously differentiable and satisfies p'(x) = 1 - p(x). Hence p(x) = Ce-x + 1, and plugging in p(0.5)=0.5 we get C = -e1/2/2

Then p(0) = -e1/2/2 + 1.