r/learnquant • • 6d ago

interview prep Quant Interview Question

Post image
70 Upvotes

8 comments sorted by

View all comments

Show parent comment

3

u/Ok_Body_2830 6d ago edited 6d ago

Here is what I think is a simpler path.

  1. Start by conditioning on M=a.
  2. We know that the other 99 X values are uniformly distributed on [0,a]. They have expected value a/2.
  3. Therefore E(S|M=a)=a+99(a/2) ->E(S-M)|M=a)=99(a/2)->E(M(S-M))|M=a)=99(a^2/2).
  4. Using LIE, this gives us E(M(S-M))=99/2 E(M^2).
  5. There is a property that if M is the highest of n draws from a uniform [0,1] distribution, E(M^k)=n/(n+k). So in this case 100/102=50/51.
  6. Therefore the answer is (99/2)*(50/51), which is the same as your (25/51)*99

If you want to develop the property in step 5 instead of just citing it:

  1. Suppose there were actually 102 draws and we are just looking at the first 100.
  2. Conditional on M. The probability either of the final two draws are less than M is M, so the probability both are less than M is M^2.
  3. To take away the conditioning, we take the expectation of M. So the probability X_101 and X_102 are both less than M is E(M^2)
  4. Any of the 102 numbers is equally likely to be the higest of the 102, so the probability that the highest of all 102 numbers is in the first 100, and therefore is equal to M, is 100/102.
  5. Since M is the highest of all 102 numbers if and only if X_101 and X_102 are less than M, steps 3 and 4 are both calculations of the same thing. So E(M^2)=100/102

Disclaimer: When working it through myself. I kind of faked Step 5. I saw that E(M)=100/101, and then sort of concluded that E(M^2)=100/102 gave me your answer and seemed like it could be a logical extension of E(M)=100/101, but I couldn't see exactly why. I looked up the proof in the second set of steps. Which I do think is pretty clever and elegant.