During an academic course on probability the following problem was being considered:
Someone was tossing a coin until heads. This happened in the $k$-th attempt. He then prepares to envelopes, one with $3^k$ money, and the other with $3^{k+1}$ money. We then choose a random envelope and find that it contains $3^i$ money for a known $i$. What is the expected gain if we discard this envelope and choose the other one?
It was proven that for $i>1$ the expected worth of the other envelope is $\frac{11}{9}\cdot 3^i$ money, so the expected gain is $\frac29\cdot3^i$; and for $i=1$ the other envelope must necessarily hold exactly $9$ money.
And here comes the paradox: It appears that for any $i$ we are expected to gain more money if we switch envelopes. So, perhaps we would be as good if we were always discarding the first envelope without opening it and choosing the other one?
The explanation was that before loking at the envelopes it can be proven that the expected worth of each envelope is $+\infty$.
I don't get this explanation. This still doesn't help me understand one thing:
Before opening the envelopes are indistinguishible, so it doesn't matter which one we choose and the expected gain of switching envelopes before opening them must, therefore, be $0$. But as soon as we acknowledge the contents of the envelope we gain enough information to always choose the other one. So, apparently, if the experiment was performed by two people, let's say, 100000 times, where person A always discards the first envelope without looking at its contents, and then takes the other envelope, and person B always opens the first envelope, looks at its contents, calculates the $i$, and then discards it and chooses the other envelope: Then, according to what was said above, person B should be richer than person A! This is beyond my understanding since this would mean that measuring the contents itself somehow has an impact on reality and, as far as I'm aware, we're outside the scope of quantum effects so we cannot really speak about Schrodinger's evelopes!
When I asked this question I was told that the expected gains of both persons were infinite, and we cannot compare $+\infty$ with $+\infty$. Very well, but in the real world we would always get some finite values we would be able to compare. Also on the grounds of mathematics we should be able to speak about the expected value of the difference or quotient of the wealth of both people. Here, again, I was told that these were likely uncalculable.
But again: If in the real world we were to perform the experiment as I described we would get finite, comparable values. Would person B be richer than person A? If yes, does looking at the envelopes alter reality??
You say that in the real world we should be able to compare the finite amounts in the envelopes and speak of the difference in the amount of money gained by A compared to the amount gained by B. But in the real world, it is impossible to set up an experiment in which we always put $3^k$ cash in one envelope and $3^{k+1}$ in the other.
Sometimes the coin will come up tails so many times in a row that there will not be enough money in the world to put a combined total of $3^k + 3^{k+1}$ in the two envelopes. Even long before that many tails, the person preparing the envelopes will be unable to obtain a sufficient amount of money. What happens then?
If we deal with the case of "not enough money" by calling off the game (no envelopes are handed out and no chance to switch occurs) then there is some integer $N$ such that $3^N$ is the largest possible amount of money that could possibly be in the envelope you received. If you happen to get an envelope with that much money in it, then if you switch you are guaranteed to get $2(3^{N-1})$ less than if you kept the envelope. There is a $\left(\frac12\right)^N$ chance of this happening ($\left(\frac12\right)^{N-1}$ chance of flipping enough tails to make the amounts in the envelopes large enough, times the $\frac12$ chance of getting the envelope with the larger amount), so at the outset of the game, before any coins have been flipped, the expected amount of money that you will give up by trading away a maximum-cash envelope is $\left(\frac32\right)^{N-1}.$ Offset that against the amounts you can expect to gain by switching in all the other cases.
As for the "Schrödinger" effect, of course looking in the envelope and doing the calculation does not affect the amount actually in the other envelope at any time; the experiment is much too far above the atomic scale for there to be any quantum-mechanical effect.
Consider a two-player experiment in which we prepare two envelopes for player A and two for player B, where player A always switches envelopes without looking and player B always looks and then switches, and we repeat this experiment many times, keeping a running total of the amounts in the envelopes that were each player's "final choice."
If the two sets of envelopes are prepared independently each time (each set is based on its own sequence of coin flips) and if we let the players independently choose which envelope they will receive first, there is a small chance that they end up with the same total score at the end, a probability $p$ (with $p<\frac12$) that B ends up with a higher total, and an equal probability $p$ that A ends up with a higher total.
If we alter the experiment by using the same value of $k$ for both sets of envelopes each time, there is a small (but slightly larger than before) probability that the players end up with the same total, a probability $p'$ that B ends up with a higher total, and a probability $p'$ that A's total is higher.
But if we use identical pairs of envelopes for each player each time and randomly choose each time (with $50$-$50$ odds) whether both players should receive the envelope with the smaller amount or the envelope with the larger amount, then the players end up with exactly the same amount.
Let's try another variant of the experiment. This time we prepare only one pair of envelopes. We let player B choose one and look inside it, after which player B can choose to keep the envelope or take the other, and player A gets whichever envelope B did not finally choose. Based on the conditional expected value calculation, player B always chooses to take the other envelope and give the initially selected envelope to A. Then the probability $p''$ that B ends up with a higher score than A is again equal to the probability that A ends up with a higher score than B.
The paradox isn't that looking in one envelope increases the amount in the other envelope. The paradox is that looking in one envelope and applying the standard procedures of Bayesian inference appears to increase the amount in the other envelope, even though it does nothing of the sort. That's the paradox that the "infinite expectation" argument attempted to explain away.
One way to look at it is that before you look in the envelope, you expect to find an infinite amount in it. I use the word "expect" in its technical probabilistic sense here; of course you know that when you finally look in the envelope the amount will be far, far less than you "expected." Looking in the envelope invariably reduces its expected value by an infinite amount, and also reduces the expected value of the other envelope by an infinite amount; but subtracting infinity from infinity does not give you a the same finite number each time, and indeed the way this experiment has been set up, the other envelope's expected value (which is still based on a probabilistic calculation) remains a little "closer to infinity" than the expected value of the envelope you looked in (which is no longer subject to probability). Acting in this information, however, will not have the effect that you expect (using expect in its ordinary English sense now).
Aside: The very name of the term "expected value" reflects the fact that in most probabilistic experiments whose outcome is a number, if we repeat the experiment many times, eventually we can expect that the running arithmetic mean of the outcomes will settle down and converge to the expected value of a single experiment. But in experiments like this variant of the two-envelope paradox, and in other experiments in which the prior expected value of each outcome is infinite, the arithmetic mean never settles down; pick any finite number $T,$ and eventually the mean will exceed $T.$ And once the mean has exceeded $T,$ inevitably if we continue it eventually will exceed $2T,$ and so forth indefinitely. The mean violates the behavior that we "expect" it to follow based on our experience with random numbers with finite expectation. Infinite expectation is weird.