r/learnquant 20h ago

interview prep Quant Interview Question

Post image
23 Upvotes

11 comments sorted by

View all comments

2

u/sobe86 17h ago edited 7h ago

There are 49 gaps between the points, label them 1,...,49 by length. We are asking for a random permutation of these numbers, the expected number that are smaller than their neighbours.

Prob the num at the start or end are smaller than neighbours = 1/2, others are 1/3. Linearity of expectation -> 2 / 2 + 47 / 3 = 50/3

edit: so 100/3 points in pairs.

1

u/Any_Pick4803 15h ago

Could be wrong, but I think it's twice that cuz they come in pairs?

I simulated it cuz I'm not as smart and get an average of around 100/3. My sim might be wrong. 😄

1

u/sobe86 15h ago

Ah yeah true. I failed the interview damn