The flaw is that a number cannot be picked randomly from an infinite set. That's because Randomly means that the probability of each choice is the same. If the probability for any choice is any non-zero amount, then the sum of probabilities for the entire set must be infinity since there are an infinite number of amounts in the set. But one of the fundamental probability laws states that the sum of probabilities of each possible choice must be 1. So, you can't randomly choose an amount from an infinite set of amounts.

That means that the premise that the probability that the amount in the other envelope is the smaller amount is 50% is not valid. That probability is undefined.

If choosing from a finite set of amounts, then the probability of the other envelope (B) having twice the amount as envelope A is zero (not 50%) if the amount in A is, for example, the highest possible amount in the finite set.

The flaw is that a number cannot be picked randomly from an infinite set. That's because Randomly means that the probability of each choice is the same. If the probability for any choice is any non-zero amount, then the sum of probabilities for the entire set must be infinity since there are an infinite number of amounts in the set. But one of the fundamental probability laws states that the sum of probabilities of each possible choice must be 1. So, you can't randomly choose an amount from an infinite set of amounts.

That means that the premise that the probability that the amount in the other envelope is the smaller amount is 50% is not valid. That probability is undefined.

If choosing from a finite set of amounts, then the probability of the other envelope (B) having twice the amount as envelope A is zero (not 50%) if the amount in A is, for example, the highest possible amount in the finite set.