r/learnquant • • 5d ago

interview prep Quant Interview Question

Post image
17 Upvotes

32 comments sorted by

View all comments

Show parent comment

1

u/OutrageousPair2300 4d ago

Roll a ten-sided die for each digit to the right of the decimal point.

That works to generate random numbers uniformly on [0,1] but won't work in the other direction (to the left of the decimal point) because digit sequences aren't allowed to continue to the left forever in the Reals.

2

u/pos_vibes_only 3d ago

Ok and when do you stop?

1

u/OutrageousPair2300 3d ago

You don't. Digit sequences are allowed to continue to the right forever, such as 0.333.... or 0.25000... and both are valid real numbers.

You can't do the same going to the left, since while ...00042 is a valid real number, ...555 is not.