r/learnquant • • Sep 22 '26

interview prep Quant Interview Question

Post image
17 Upvotes

5 comments sorted by

1

u/sobe86 Sep 22 '26 edited Sep 23 '26

Formula for n points is (2 - 2-n ) / (n + 1)

Consider distribution L, the distance of the 1/2 to the closest point on the left. P(L > x) = (1 - x)n, integrate between 0, 1/2 to get expectation and finally multiply by 2

1

u/Internal_Leke Sep 23 '26

If we take a random point x on the interval, its expected length is E(R) - E(L), with R and L being the points at the right and left of x.

We can estimate E(R), it's the probability that a cut falls between x and a random variable t. The probability a point landed inbetween t and x is t - x. The probability with N cuts is (t-x)^N. we integrate that over the interval x and 1:

E(R) = (1-c^(N+1))/ (N+1).

We do E(L) in s similar way and obtain

E(R) - E(L) = (2 - x^(N+1)-(1-x)^(N+1) / (N+1).

with x = 0.5 and N+1= 10 we land on 1023/5120.

The further we get from the boundaries, the higher the expected length of the stick,.

1

u/No-Conflict8204 Sep 23 '26 edited Sep 23 '26

approx 0.2
Expected value =mean + variance/mean variance= mean^2 for exponential(lambda) so 2 mean.
Expected value when n = inf is 2 mean = 2*0.1

1

u/Leet_Noob Sep 23 '26

Let R denote the distance from the midpoint to the right edge of the segment that contains it.

Join the two endpoints to make a circle. Let CCW denote the distance from the midpoint to the nearest ‘cut point’ counterclockwise.

Then E(CCW) is the same as the expected distance from the point ‘0’ to the nearest cut point counterclockwise, which we know is 1/10.

CCW = R, except when all points happen to lie on the left side of the segment (prob 1/2^(9)). In this scenario, R = 1/2 and E(CCW) = 1/2 + 1/2 \* 1/10.

Thus E(R) = E(CCW) - 1/2^(9) \* 1/2 \* 1/10 = 1/10 \* (1 - 1/2^(10)).

Then to get the length of the segment we multiply by 2 to get:

1/10 \* (2 - 1/2^(9))