I pick two real numbers through some process unknown to you. It might be random and it might not. Maybe I always pick “3” and “100”. Maybe I roll two dice. Maybe I write C code by mashing a keyboard until it compiles and prints two numbers (or produces Windows ME). Maybe I always use 0 for the first number, and for the second I call my aunt and ask her for a negative real number, which I multiply by the estimated number of protons in the universe. (At this point, my aunt is used to that kind of call from me.)

I put these two numbers on slips of paper and put them in two envelopes. I thoroughly shuffle the envelopes, and then you choose one via a fair coin toss. You open it and look at the number. You are now given the option (as in the infamous but very different Monty Hall problem) of switching to the other envelope.

Your goal is to pick the envelope with the higher number. Can you come up with a strategy that guarantees you a better-than-even chance of winning?

The solution is in the comments, it’s a quite simple and elegant one.