How is it that you can guess if one of a pair of random numbers is larger with probability > 1/2? - MathOverflow most recent 30 from http://mathoverflow.net 2013-06-20T11:35:46Z http://mathoverflow.net/feeds/question/9037 http://www.creativecommons.org/licenses/by-nc/2.5/rdf http://mathoverflow.net/questions/9037/how-is-it-that-you-can-guess-if-one-of-a-pair-of-random-numbers-is-larger-with-p How is it that you can guess if one of a pair of random numbers is larger with probability > 1/2? Bill Thies 2009-12-15T20:30:59Z 2010-12-16T20:03:43Z <p>My apologies if this is too elementary, but it's been years since I heard of this paradox and I've never heard a satisfactory explanation. I've already tried it on my fair share of math Ph.D.'s, and some of them postulate that something deep is going on.</p> <p>The Problem:</p> <p>You are on a game show. The host has chosen two (integral and distinct) numbers and has hidden them behind doors A and B. He allows you to open one of the doors, thus revealing one of the numbers. Then, he asks you: is the number behind the other door bigger or smaller than the number you have revealed? Your task is to answer this question correctly with probability strictly greater than one half.</p> <p>The Solution:</p> <p>Before opening any doors, you choose a number $r$ at random using any continuous probability distribution of your choice. To simplify the analysis, you repeat until $r$ is non-integral. Then you open either door (choosing uniformly at random) to reveal a number $x$. If $r &lt; x$, then you guess that the hidden number $y$ is also smaller than $x$; otherwise you guess that $y$ is greater than $x$.</p> <p>Why is this a winning strategy? There are three cases:</p> <p>1) $r$ is less than $x$ and $y$. In this case, you guess "smaller" and win the game if $x > y$. Because variables $x$ and $y$ were assigned to the hidden numbers uniformly at random, $P(x > y) = 1/2$. Thus, in this case you win with probability one half.</p> <p>2) $r$ is greater than $x$ and $y$. By a symmetric argument to (1), you guess "larger" and win with probability one half.</p> <p>3) $r$ is between $x$ and $y$. In this case, you guess "larger" if $x &lt; y$ and "smaller" if $x > y$ -- that is, you always win the game.</p> <p>Case 3 occurs with a finite non-zero probability $\epsilon$, equivalent to the integral of your probability distribution between $x$ and $y$. Averaging over all the cases, your chance of winning is $(1+\epsilon)/2$, which is strictly greater than half.</p> <p>The Paradox:</p> <p>Given that the original numbers were chosen "arbitrarily" (i.e., without using any given distribution), it seems impossible to know anything about the relation between one number and the other. Yet, the proof seems sound. I have some thoughts as to the culprit, but nothing completely satisfying.</p> <p>Insightful members, could you please help me out with this one? Thanks!</p> http://mathoverflow.net/questions/9037/how-is-it-that-you-can-guess-if-one-of-a-pair-of-random-numbers-is-larger-with-p/9041#9041 Answer by Andrew Critch for How is it that you can guess if one of a pair of random numbers is larger with probability > 1/2? Andrew Critch 2009-12-15T20:53:50Z 2010-12-16T11:04:43Z <p>Thanks for writing out the proof in detail, so that answers can easily refer back to it! The math is fairly straightforward, but as a paradox I find this very interesting.</p> <p>Spoiler alert: Paradoxes are awesome! If you like paradoxes, don't read below unless you've thought about it yourself first, or just don't care :)</p> <p><B>EDIT (Dec. 17, after change in question statement):</b> This answer interprets the question with the values { $x,y$ } varying over possible games. Mathematically speaking this is only an integral more general than the case where { $x,y$ } is fixed (which is the special case where the hosts's choice distribution $Q$ is supported uniformly on two fixed integers), but a new level of potentially paradoxical issues arise. The answer below is intended <b>presuming the fixed case is understood</b>, and addresses issues that arise in passing to the variable case. For a discussion of the fixed case, I recommend <a href="http://mathoverflow.net/questions/9037/9164#9164" rel="nofollow">Darsh's excellent answer</a>.</p> <hr> <p><b>Logical/mathematical remarks:</b></p> <p><b>(0)</b> An easier method than "repeating until non-integral" is to directly fix a probability distribution $P$ on numbers of the form $n+0.5$ and choose one randomly via $P$.</p> <p><b>(1)</b> The proof for this strategy is valid provided that you know the host is choosing his number according to SOME fixed, well-defined probability distribution $Q$ on the integers (but you don't have to know what $Q$ is). In this sense, <b>you know that his choice is actually not completely arbitrary</b>... you know he's following some system, even if you don't know which one.</p> <p>For example</p> <p><B>(1.1)</B> Specifically, consider the step "Averaging over all the cases" (after Case 3 in the question). The number $\epsilon$ in Case 3 depends on $x$, $y$, and your distribution $P$. "Average over all the cases" means that you integrate the function $(1+\epsilon)/2$ over the space of all possible pairs $(x,y)$. This requires a probability distribution on the pairs $(x,y)$, which is where $Q$ comes in. Since any $Q$ will give a result greater than $1/2$, <b>it is tempting to think $Q$ is irrelevant to the conclusion</b>. This is a fallacy! I cannot stress enough that treating an unknown as a random variable is a <b>non-vacuous assumption</b> that has real consequences, this scenario itself being an example. Without this assumption, the step "Averaging over all the cases" is meaningless and invalid.</p> <p><b>(2)</b> Although the result of your strategy is that you "know something" about the relation between the two numbers, <b>your confidence in this knowledge is arbitrary</b>. That is, you have no estimate, not even a probabilistic one, on how much bigger than $0.5$ your chances of winning are.</p> <hr> <p><b>Resolving the paradox:</b> (isolating what causes the "weird feeling" here)</p> <p>In short, I'd say mixing "random" and "arbitrary" in the same scenario makes for a patchy idealization of reality.</p> <p>Here, one unknown, the <b>choice of ordered pair</b> $(x,y)$, is being treated via a probability distribution $Q$, whereas a related unkown, the <b>choice of probability distribution</b> $Q$, is being treated as "arbitrary". This is a weird metaphysical mix of assumptions to make.</p> <p>Why?</p> <p>For example, in science and in everyday life, an estimate of "what's likely" can be accompanied, consciously or unconsciously, with an estimate of how accurate the first estimate is, and in principal one could have estimates of those accuracies as well, and so on. This capacity for self reflection is a big part of being sentient (or at least the "illusion of sentience", whatever that means).</p> <p><b>In this scenario, such self-reflective estimates are in principle impossible</b> (because we don't assume that the host's distribution $Q$ was chosen according to any distribution on distributions), which makes it a very unfamiliar situation. </p> <p>This is just one reason why mixing "random" and "arbitrary" can make for a weird-seeming model of reality, and I blame this mixture for allowing the scenario to appear paradoxical.</p> http://mathoverflow.net/questions/9037/how-is-it-that-you-can-guess-if-one-of-a-pair-of-random-numbers-is-larger-with-p/9045#9045 Answer by Steve Flammia for How is it that you can guess if one of a pair of random numbers is larger with probability > 1/2? Steve Flammia 2009-12-15T22:04:43Z 2009-12-15T22:04:43Z <p>There is a related "paradox" known as the <a href="http://en.wikipedia.org/wiki/Two%5Fenvelopes%5Fproblem" rel="nofollow">two envelopes problem</a> which has a nice article on wikipedia.</p> http://mathoverflow.net/questions/9037/how-is-it-that-you-can-guess-if-one-of-a-pair-of-random-numbers-is-larger-with-p/9150#9150 Answer by Tyler for How is it that you can guess if one of a pair of random numbers is larger with probability > 1/2? Tyler 2009-12-17T03:49:40Z 2009-12-17T03:49:40Z <p>I don't think there is any need to reason about your opponent's probability distribution (and therefore the above explanations of the paradox seem spurious). For concreteness, say that you draw your guess from the Laplace distribution. You can now claim: "For every pair of integers (a,b), the probability of success is strictly greater than 1/2". </p> <p>There's no distribution here -- we can just make this claim about the set of all integer pairs, and so we no longer have to reason about how the opponent comes up with them.</p> http://mathoverflow.net/questions/9037/how-is-it-that-you-can-guess-if-one-of-a-pair-of-random-numbers-is-larger-with-p/9164#9164 Answer by Darsh Ranjan for How is it that you can guess if one of a pair of random numbers is larger with probability > 1/2? Darsh Ranjan 2009-12-17T10:21:11Z 2009-12-19T09:23:07Z <p>After Bill's latest clarifications in the commentary on Critch's answer, I think the question is interesting again. My take: </p> <p>One thing that always seemed to fall through the cracks when I learned about probability theory is that probability is intricately tied to information, and probabilities are only defined in the context of information. Probabilities aren't absolute; two people who have different information about an event may well disagree on its probability, even if both are perfectly rational. Similarly, if you get new information relevant to a certain event, then you should probably reevaluate what you think is the probability that it will occur. Your particular problem is interesting because the new information you get isn't enough for you to revise that probability by purely mathematical considerations, but I'll get to that in good time. </p> <p>With the previous paragraph in mind, let's compare two games: </p> <p>G1. You are given two closed doors, A and B, with two numbers behind them, and your goal is to choose the door with the higher number. You are given no information about the doors or numbers. </p> <p>G2. You are given two closed doors, A and B, with two numbers behind them, and your goal is to choose the door with the higher number. <b>You are allowed to look behind one of the doors and <i>then</i> make your choice. </b></p> <p>For the first game, by symmetry, you clearly can't do better than choosing a door randomly, which gives you a success probability of exactly 1/2. However, the second game has a chance of being better. You are playing for the same goal with strictly more information, so you might expect to be able to do somewhat better. [I had originally said that it was obviously better, but now I'm not so sure that it's obvious.] The tricky thing is quantifying how much better, since it's not clear how to reason about the relationship between two numbers if you know one of the numbers and have no information about the other one. Indeed, it isn't even possible to quantify it mathematically. </p> <p>"But how can that be?" you may ask. "This is a mathematical problem, so how can the solution not be mathematically definable?" There's the rub: part of the issue is that the problem <i>isn't</i> formulated in a mathematically rigorous way. That can be fixed in multiple ways, and any way we choose will make the paradox evaporate. The problem is that we're asked to reason about "the probability of answering the question correctly," but it's not clear what context that probability should be computed in. (Remember: probabilities aren't absolute.) In common probability theory problems and puzzles, this isn't an issue because there is usually an unambiguous "most general applicable context": we should obviously assume exactly what's given in the problem and nothing else. We can't do that here because the most general context, in which we assume nothing about how the numbers $x$ and $y$ are chosen, <b>does not define a probability space at all</b> and thus the "probability of answering the question correctly" is not a meaningful concept. </p> <p>Here's a simpler ostensible probability question that exhibits the same fallacy: "what's the probability that a positive integer is greater than 1,000,000?" In order to answer that, we have to pick a probability distribution on the positive integers; the question is meaningless without specifying that.</p> <p>As I said, there are multiple ways to fix this. Here are a couple:</p> <p>I1. (Tyler's interpretation.) We really want the probability of answering the question correctly <i>given a particular $x$ and $y$</i> to be greater than 1/2. (The exact probability will of course depend on the two numbers.) </p> <p>I2. (Critch's interpretation.) More generally, we want the probability of answering correctly <i>given a particular probability distribution for $(x,y)$</i> to be greater than 1/2. (The exact probability will of course depend on the distribution.) </p> <p>(Those two are actually equivalent mathematically.) Clearly, if we knew what that distribution was, we could cook up strategies to get a success probability strictly above 1/2. That's pretty much obvious. It is not nearly as obvious that <i>a single</i> strategy (such as the one in the statement of the question) can work for <i>all</i> distributions of $(x,y)$, but it's true, as Bill's proof shows. It's an interesting fact, but hardly paradoxical now. </p> <p>Let me summarize by giving proper mathematical interpretations of the informal statement "there is a strategy that answers the question correctly with probability strictly greater than 1/2," with quantifiers in place:</p> <blockquote> <p>(1a) $\exists \text{ strategy } S: \forall x, y: \exists \delta > 0$: $S$ answers correctly on $x$, $y$ with probability at least $1/2 + \delta$.</p> <p>(1b) $\exists \text{ strategy } S: \forall \text{ probability distributions } P \text{ on } \mathbb{N}^2: \exists \delta > 0$: $S$ answers correctly, when $x$, $y$ are chosen according to $P$, with probability at least $1/2 + \delta$.</p> </blockquote> <p>I think with the proper quantifiers and the dependence on $x$ and $y$ explicit, it becomes a cool mathematical result rather than a paradox. Actually, based on my arguments at the beginning, it's not even that surprising: we <i>should</i> expect to do better than random guessing, since we are given information. However, simply knowing one number doesn't seem very useful in determining whether the other number is bigger, and that's reflected in the fact that we can't improve our probability by any fixed positive amount without more context. </p> <p><b>Edit:</b> It occurred to me that the last part of my discussion above has a nonstandard-analytical flavor. In fact, using the first version of the formula for simplicity (the two being equivalent), and the principle of idealisation, I think we immediately obtain: </p> <blockquote> <p>(2) $\exists \text{ strategy } S: \exists \delta > 0: \forall \text{ standard }x, y:$ $S$ answers correctly on $x$, $y$ with probability at least $1/2 + \delta$.</p> </blockquote> <p>(Please correct me if I'm wrong.) The number $\delta$ is not necessarily standard, and a basic argument shows that it must actually be smaller than all standard positive reals, i. e., infinitesimal. Thus, we can say that being able to look behind one door gives us an unquantifiably small, infinitesimal edge over random guessing. That actually meshes pretty well with my intuition! (It might still a nontrivial observation that the strategy $S$ can be taken standard; I'm not sure about that...)</p> http://mathoverflow.net/questions/9037/how-is-it-that-you-can-guess-if-one-of-a-pair-of-random-numbers-is-larger-with-p/15791#15791 Answer by dorkusmonkey for How is it that you can guess if one of a pair of random numbers is larger with probability > 1/2? dorkusmonkey 2010-02-19T05:11:48Z 2010-02-19T05:11:48Z <p>Consider the following simplified problem: I will pick two numbers from the non-zero integers with probability proportional to $\frac{1}{|k|}$. So:</p> <p>$$p(|k|) \propto \frac{1}{|k|}$$</p> <p>And we play the same game as above, I reveal one and ask you whether the other is smaller or not. Now, what is p(5)? This is just $\frac{1}{R} \frac{1}{|5|}$, where $R$ is the renormalization constant. So:</p> <p>$$R = 2 \sum_{k=1}^{\infty} \frac{1}{k}$$</p> <p>whoops!</p> <p>So, now, what does this mean? is $p(5) = 0$? is $p(k) = 0$ for all k? Does this problem make any more sense if I took the probability proportional to $\frac{1}{|k|}^\alpha$ as $\alpha \to 0$? What does it mean to pick a number whose probability is 0?</p> <p>How would I even write down these numbers to compare them? They're obviously much larger than the number of atoms in the universe...Do I have an algorithm to spit out the bits and try to compare them that way?</p> <p>This problem is a syntax error. The premise that you can 'pick a random number' from <em>all</em> integers is invalid. You can't do this. The reason why your (faulty) logic appears to work is because you're implicitly capping the distribution from $[-M,M]$ and then waving your hands by taking $M \to \infty$, which can't be done.</p> http://mathoverflow.net/questions/9037/how-is-it-that-you-can-guess-if-one-of-a-pair-of-random-numbers-is-larger-with-p/30551#30551 Answer by BlueRaja for How is it that you can guess if one of a pair of random numbers is larger with probability > 1/2? BlueRaja 2010-07-04T20:30:40Z 2010-07-05T04:48:04Z <p>The problem is that there's no way to define a random sample over all the real numbers, where every real number has equal probability of being chosen.</p> <p>See <a href="http://blog.xkcd.com/2010/02/09/math-puzzle/comment-page-1/#comment-17804" rel="nofollow">this related problem and solution</a> by Randall Munroe, the creator of <a href="http://xkcd.com/" rel="nofollow">XKCD</a>.</p> http://mathoverflow.net/questions/9037/how-is-it-that-you-can-guess-if-one-of-a-pair-of-random-numbers-is-larger-with-p/30616#30616 Answer by sigoldberg1 for How is it that you can guess if one of a pair of random numbers is larger with probability > 1/2? sigoldberg1 2010-07-05T12:45:08Z 2010-07-05T15:57:33Z <p>As previously explained above, the success of the proposed contestant strategy is entirely dependent upon the assumption made by the contestant about the host's method of choosing x and y. </p> <p>An example where a fixed contestant strategy almost always fails. Suppose the host always chooses an "unexpectedly" large negative number for x, say x = -n, where n has >1000 digits, and r is more "ordinary", say having &lt;100 digits. The method depends on the contestant betting that x &lt; r &lt; y. If the host's uniform strategy has always chosen y = x-1, then the contestant will almost certainly lose round after round of play. (If, after numerous rounds of this, the contestant then realizes this strategy of the host and tries to change his/her betting strategy, the host can adapt as well, choosing y = -x = n for later rounds) </p> http://mathoverflow.net/questions/9037/how-is-it-that-you-can-guess-if-one-of-a-pair-of-random-numbers-is-larger-with-p/30641#30641 Answer by Daniel Mehkeri for How is it that you can guess if one of a pair of random numbers is larger with probability > 1/2? Daniel Mehkeri 2010-07-05T17:17:30Z 2010-07-05T21:02:03Z <p>I'm finding most of the above either wrong or unnecessarily obtuse. My take is that the paradox arises in two parts. The first is a simple trick. The game looks like it reduces to:</p> <blockquote> <p>(Incorrect:) The game show host puts the prize behind one of two doors. He tells you an arbitrary unrelated integer m. You pick a door.</p> </blockquote> <p>But the integer m is actually related. The game really reduces to:</p> <blockquote> <p>The host puts the prize behind one of two doors, and picks an integer n. You pick a door. He tells you m, computed as follows: if you picked the right door, m=n, if not, m=n+1 (or greater). You then get an option to switch doors before he opens them.</p> </blockquote> <p>Now, for the sake of brevity, let's just take it for granted that you should pick a random door initially, and privately choose an integer r. On hearing m, you should switch doors if r&lt;m. Let's also take the worst case that m=n+1 when you initially guess the wrong door. The whole thing reduces to the following:</p> <blockquote> <p>The host picks an integer n. You guess what the integer is. If you guess right, he gives you the prize. If not, he flips a coin to decide if you win.</p> </blockquote> <p>Let me emphasise that up to this point, <strong>the reduction involves only integers and makes no assumptions on probability distributions for guessing arbitrary integers</strong>. The second part of the paradox is just this:</p> <blockquote> <p>Proposition: You have a strictly positive probability of correctly guessing an arbitrary integer. </p> </blockquote> <p>Here comes in all the talk of distributions, interpretations, random versus arbitrary, etc.</p> http://mathoverflow.net/questions/9037/how-is-it-that-you-can-guess-if-one-of-a-pair-of-random-numbers-is-larger-with-p/49681#49681 Answer by Steven Landsburg for How is it that you can guess if one of a pair of random numbers is larger with probability > 1/2? Steven Landsburg 2010-12-16T20:03:43Z 2010-12-16T20:03:43Z <p>It might be useful to the intuition to consider the following simpler strategy: If the revealed number is positive, guess that it is the larger of the two. If the revealed number is negative, guess that it is the smaller of the two.</p> <p>This simple strategy already guarantees you a chance of winning that is always at least 50% and sometimes greater. In particular, your chance of winning is 50% if the numbers are either both positive or both negative, and 100% if they have opposite signs. </p> <p>That's not quite a solution to the original problem, but it works --- or comes close to working --- for exactly the same reason that the actual solution works, and it's easy to understand in an instant.</p>