This problem is a variation on a two envelope paradox.
This time Alice and Bob play the game. Envelopes X and Y, when opened contain money. One envelope has n dollars and the other has 2*n dollars. Alice opened envelope X, saw 20 dollars and decides if she wants to get this envelope (X)or the envelope Y. From her perspective, envelope Y has 40 or 10, thus mean is 30 > 20 and she should change the envelope.
Bob knows that Alice chose envelope X. Bob also knows something that Alice doesn't: when Alice chose X a machine first generated value for envelope Y, then produced value for envelope X based on a fair coin flip. From Bob's perspective envelope X has better average return.
So, Alice should choose Y and Bob should choose X for the same pair of envelopes. We can test this experimentally. Who's strategy is going to be correct?
My impression is that there are three cases
(1) In a single experiment this question is meaningless (one loses other wins with 50%/50% chances)
(2) In repeated experiments with narrow interval of valid values (more than a dollar, but less than 1000) Alice will lose whenever envelope X contains more than half of the cutoff sum. "Envelope X has 998, so there is a 50/50 chance of 1996 in other envelope!" - no. There is a 100% chance of 499 in Y due to the cutoff. Bob will never suffer from this cutoff effect.
(3) If we increase the cutoff value to decrease the devastating effect of cutoff on Alice then we go back to case (1). A lucky streak of 2 wins in 1000 rounds is negated by a single loss of in one billion vs two billion dollars round.
Is this analysis correct?