r/learnquant • • 27d ago

interview prep Quant Interview Question

Post image
43 Upvotes

8 comments sorted by

1

u/tajwriggly 24d ago

The expected value of any given number drawn is 0.5.

So the sum of the last two should be 0.5 + 0.5 = 1.

1

u/kyloc85 24d ago

The correct solution is (5-e)/2

0

u/Much_Discussion1490 27d ago

Should be 1.

If X and Y are last 2 random numbers which are drawn respectively they will be iid firstly.

So E(X+Y)=E(X) +E(Y)

For Y , which is the last number drawn, the sum will go over 1 if the sum jist priort to the number being drawn is say s and the number is drawn in the interval [1-s, 1] . Since its uniformly distributed hence the E[Y] should be the mid point of this interval ie. (2-s)/2

To have reached the sum of s , X would habe had to be drawn in the interval 0 to s. E(X) would thus be s/2. This includes all the cases starting from X being the very first number drawn till the second last number tending as close as possible to s.

Thus E(X+Y) = (2-s)/2 +s/2 =1

The result still feels so counterintuitive because my first thought would have been 0 working with point probabilities in a continuous space. But it seems like the expectation is biased towards picking X and Y within the first 2 tries itself

1

u/kyloc85 27d ago

E[Y] is fine. Not clear to me that E[X] is correct. For example if there are only two draws E[x] would be s. It is sensitive to the total number of draws.

1

u/Much_Discussion1490 27d ago

True for 2 draws. But its a expectation so it will be across multiple draws tending to infinity. Hence , given the numbers are uniformly distributed. You would expect X to be somewhere exaxtly between 0 to s. For 2 draws it would be at s exactly. For 1000 draws , or 1000000 draws..not necessarily

1

u/kyloc85 27d ago

For a huge number of draws you would expect E[X] to be close to 0. It may average to s/2 over all possibilities … but I am not sure …

1

u/kyloc85 24d ago

Yea your answer is wrong … correct answer is (5-e)/2 not 1

1

u/Kajtek14102 21d ago

Definayelly no. If you draw 0.00001 its unlikely that's a final number. When you draw 0.999 its almost for sure last number. There will be more 0.99 than 0.01 in this set over a long time. It's for sure more than one (although I have no way of calculating it yet)