Quant Memo
Coding/●●●●●

Estimate e by summing uniforms past 1

Asked at Jane Street, Optiver

Draw U(0,1)U(0,1) numbers one at a time and add them up. Stop the moment the running sum exceeds 1, and record how many draws that took. A remarkable fact is that the expected number of draws is exactly e2.71828e \approx 2.71828.

Write the estimator, and say roughly how many trials you need for 3 correct decimals of ee.

Your answer

This one is open-ended. Work it through, then check your reasoning against the full solution.

More Coding questions