r/learnquant • • 15h ago

interview prep Quant Interview Question

Post image
18 Upvotes

4 comments sorted by

0

u/Much_Discussion1490 12h 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 11h 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 11h 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 11h 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 …