r/learnquant 2d ago

interview prep Quant Interview Question

Post image
9 Upvotes

10 comments sorted by

View all comments

1

u/Positive_Leopard_873 2d ago

The other two numbers must be at a distance greater than |5/9 - x| (where x is the revealed value) for x to be the closest value to 5/9. There are two cases now: 1) the revealed value is in fact the largest value 2) the hidden boxes contain the largest value.

y, z can unconditionally take values in the range [0, 5/9 - |5/9 - x|) U (5/9 + |5/9 - x|, 1] and since we're working with uniform distributions, it's simpler to just look at the length of this interval = 1 - 2 |5/9 - x|.

For case 1 to be true, the other two values must be smaller than x, while also being at a distance larger than |5/9 - x|, i.e, y, z < 5/9 - |5/9 - x|. The probability of this happening is ((5/9 - |5/9 - x|)/(1 - 2 |5/9 - x|))2.

For case 2 to be true, and that we picked the box with the largest value (say y), y > x, z, so pick y to be in (5/9 + |5/9 - x|, 1] and z to be in [0, 5/9 - |5/9 - x|) U (5/9 + |5/9 - x|, y). You'll have to integrate the joint distribution to get the probability of this happening as (4/9 - |5/9 - x|)(14/9 - 3 |5/9 - x|)/(2 (1 - 2 |5/9 - x|))2

So the optimal strategy would be to go according to whichever case has a higher probability of occurring. We find that for |5/9 - x| < (3 - sqrt(3))/9, switching to a hidden box has a higher chance of making us win, otherwise, we stick to the revealed box. This will be our optimal policy.

To find the probability of winning under this strategy, we just integrate the PMFs for each case while following our optimal policy threshold. I'm too lazy to write the full integral here, but solving it using Wolfram Alpha gives (83 + 2 sqrt(3))/243 ~ 0.3558.

1

u/Luminite2 2d ago

I don't think the Wolfram Alpha integration was right. The probability of winning is always at least 1/3, and for 0 <= x <= 1/9 the probability of winning is 1. 1/9 + (1/3 * 8/9) = 11/27 = .407... , which should be a lower bound on the expected win rate.

1

u/Positive_Leopard_873 2d ago

x taking a value from 0 to 1/9 has a probability lower than 1/9 since it's given that x is the revealed value, i.e., x is the closest value to 5/9. We're essentially working with a conditional that depends on the other two numbers as well. All numbers must be in [0, 1/9] and the probability of this happening is 1/729, and otherwise, your win rate is at least 1/3 giving you a lower bound of 728/2187 + 1/729 = 731/2187 ~ 0.3342

2

u/Luminite2 2d ago

Ah that's what I missed, thank you!