r/learnquant • • 5d ago

interview prep Quant Interview Question

Post image
17 Upvotes

32 comments sorted by

View all comments

1

u/BrotherItsInTheDrum 4d ago

Let the expected value be X.

90% chance: the first digit is not 4, and the expected value is now X+1.

9% chance: the first digit is 4 but the second is not. The expected value is now X+2

0.9% chance: the first 2 digits are 4 but the third is not. The expected value is now X+3.

0.1% chance: the first 3 digits are all 4, and the expected value is 3.

So we have X = (0.9)(X+1) + (0.09)(X+2) + (0.009)(X+3) + (0.001)(3)

Solving the equation, we get X = 1110. Scarily, I plugged the equation into Google, and Gemini both solved it and recreated the original question (in a slightly different form). Shit's getting real.

1

u/ProfessorPhi 4d ago

Oh this is clever, doing it via the expectation itself rather than on the probability sequences.