Interesting Math Puzzle from 538.com

The forum for general posting. Come join the madness. :)
Message
Author
User avatar
jarnon
Posts: 7003
Joined: Tue Oct 09, 2007 9:52 pm
Location: Merion, Pa.

Re: Interesting Math Puzzle from 538.com

#26 Post by jarnon » Sat Mar 05, 2016 4:59 pm

This problem is tough. Took me a few tries to get it right.
smilergrogan wrote:
plasticene wrote:I'm starting to think I messed up my probability formula too. Maybe jarnon's answer was right after all! I've got more work to do.
Using my inelegant method I get x = 0.5 beating y = 0.414 by about 51.2% to 48.8%, and x = 0.5 beating y = 0.7 by about 50.9% to 49.1%. y = 0.6 beats x = 0.5 by about 50.5% to 49.5%, and y = 0.618 beats x = 0.5 by very slightly more: 50.55% to 49.45%. So that seems to back up jarnon; I wish I knew how he arrived at his answer.
OK, let's say SSS and I are playing. Each of us picks a threshold; let x be SSS's threshold and y be mine. Assume x < y. Then the random number generator cranks out our numbers. There are four cases:
  • Both our numbers are less than our thresholds, so we both get new numbers. The likelihood of this case is xy, and the probability of SSS winning in this case is ½.
  • SSS's number is more than his threshold, but mine isn't. The likelihood of this case is (1-x)y, and the probability of SSS winning in this case is (x+1)/2.
  • My number is more than my threshold, but SSS's isn't. The likelihood of this case is x(1-y), and the probability of SSS winning in this case is (1-y)/2.
  • Both our numbers are more than our thresholds. The likelihood of this case is (1-x)(1-y), and the probability of SSS winning in this case is (1-y)/2(1-x).
Combining the cases, the probability of SSS beating me is [x(y^2) - (x^2)y - xy + y^2 + x - y + 1]/2. For a fixed value of y, this equation is a quadratic in x with negative second derivative. If y is more than ɸ = (√5 - 1)/2, the curve has an absolute maximum between 0 and y, and that threshold gives SSS the best chance of winning. Even if SSS doesn't know my threshold, he can do well by choosing x = ɸ. At that value of x, the first derivative is negative, so SSS's probability of winning is more than ½.
But if yɸ, the curve is strictly increasing, and no threshold less than y gives SSS a better than even chance.
Now assume x > y. The probability of SSS winning in the fourth case changes to (1-x-2y)/2(1-y). Combining the cases as before, the probability of SSS beating me is [x(y^2) - (x^2)y - x^2 + xy + x - y + 1]/2. For a fixed y < ɸ, the curve has an absolute maximum between y and 1, and that threshold gives SSS the best chance of winning. But if SSS doesn't know my threshold, he should again choose x = ɸ. At that value of x, the first derivative is positive, so SSS's probability of winning is more than ½.
But if yɸ, the curve is strictly decreasing, and no threshold more than y gives SSS a better than even chance.
So my best choice is y = ɸ. SSS can even the odds by choosing x = ɸ, but any other threshold is a losing bet for him.
Слава Україні!

User avatar
Bob78164
Bored Moderator
Posts: 22159
Joined: Mon Oct 08, 2007 12:02 pm
Location: By the phone

Re: Interesting Math Puzzle from 538.com

#27 Post by Bob78164 » Sun Mar 06, 2016 10:17 am

They post the answer the following Sunday, right? --Bob
"Question with boldness even the existence of a God; because, if there be one, he must more approve of the homage of reason than that of blindfolded fear." Thomas Jefferson

User avatar
silverscreenselect
Posts: 24669
Joined: Mon Oct 08, 2007 11:21 pm
Contact:

Re: Interesting Math Puzzle from 538.com

#28 Post by silverscreenselect » Sun Mar 06, 2016 11:24 am

Bob78164 wrote:They post the answer the following Sunday, right? --Bob
They will post the answer in Friday's column, along with the next puzzle.
Check out our website: http://www.silverscreenvideos.com

User avatar
smilergrogan
Posts: 1529
Joined: Thu Jan 24, 2008 1:22 pm
Location: under a big W

Re: Interesting Math Puzzle from 538.com

#29 Post by smilergrogan » Sun Mar 06, 2016 2:17 pm

jarnon wrote:This problem is tough. Took me a few tries to get it right.
smilergrogan wrote:
plasticene wrote:I'm starting to think I messed up my probability formula too. Maybe jarnon's answer was right after all! I've got more work to do.
Using my inelegant method I get x = 0.5 beating y = 0.414 by about 51.2% to 48.8%, and x = 0.5 beating y = 0.7 by about 50.9% to 49.1%. y = 0.6 beats x = 0.5 by about 50.5% to 49.5%, and y = 0.618 beats x = 0.5 by very slightly more: 50.55% to 49.45%. So that seems to back up jarnon; I wish I knew how he arrived at his answer.
OK, let's say SSS and I are playing. Each of us picks a threshold; let x be SSS's threshold and y be mine. Assume x < y. Then the random number generator cranks out our numbers. There are four cases:
  • Both our numbers are less than our thresholds, so we both get new numbers. The likelihood of this case is xy, and the probability of SSS winning in this case is ½.
  • SSS's number is more than his threshold, but mine isn't. The likelihood of this case is (1-x)y, and the probability of SSS winning in this case is (x+1)/2.
  • My number is more than my threshold, but SSS's isn't. The likelihood of this case is x(1-y), and the probability of SSS winning in this case is (1-y)/2.
  • Both our numbers are more than our thresholds. The likelihood of this case is (1-x)(1-y), and the probability of SSS winning in this case is (1-y)/2(1-x).
Combining the cases, the probability of SSS beating me is [x(y^2) - (x^2)y - xy + y^2 + x - y + 1]/2. For a fixed value of y, this equation is a quadratic in x with negative second derivative. If y is more than ɸ = (√5 - 1)/2, the curve has an absolute maximum between 0 and y, and that threshold gives SSS the best chance of winning. Even if SSS doesn't know my threshold, he can do well by choosing x = ɸ. At that value of x, the first derivative is negative, so SSS's probability of winning is more than ½.
But if yɸ, the curve is strictly increasing, and no threshold less than y gives SSS a better than even chance.
Now assume x > y. The probability of SSS winning in the fourth case changes to (1-x-2y)/2(1-y). Combining the cases as before, the probability of SSS beating me is [x(y^2) - (x^2)y - x^2 + xy + x - y + 1]/2. For a fixed y < ɸ, the curve has an absolute maximum between y and 1, and that threshold gives SSS the best chance of winning. But if SSS doesn't know my threshold, he should again choose x = ɸ. At that value of x, the first derivative is positive, so SSS's probability of winning is more than ½.
But if yɸ, the curve is strictly decreasing, and no threshold more than y gives SSS a better than even chance.
So my best choice is y = ɸ. SSS can even the odds by choosing x = ɸ, but any other threshold is a losing bet for him.
Very good - thank you! I am heartened to see that my crummy method actually calculated the real odds pretty well. I miscalculated for x = 0.5 vs. y = 0.7, and the correct answer matches up exactly with the one calculated from the expression above, as do the others, except for some rounding error (x = 0.5 vs. y = 0.618 actually works out to 49.57% to 50.43% odds, which means 0.618 isn't the best value of y specifically for beating x = 0.5. I think you could make an argument that y = 7/12 = 0.583 would be a good answer too, since that is the value of y that maximizes the odds of beating x = 0.5, and I would bet a large percentage of opponents in a real game would choose 0.5 for the cutoff, reasoning that that's the point where they have a 50% chance of improving their number.

User avatar
jarnon
Posts: 7003
Joined: Tue Oct 09, 2007 9:52 pm
Location: Merion, Pa.

Re: Interesting Math Puzzle from 538.com

#30 Post by jarnon » Tue Mar 08, 2016 3:21 pm

smilergrogan wrote:Very good - thank you! I am heartened to see that my crummy method actually calculated the real odds pretty well. I miscalculated for x = 0.5 vs. y = 0.7, and the correct answer matches up exactly with the one calculated from the expression above, as do the others, except for some rounding error (x = 0.5 vs. y = 0.618 actually works out to 49.57% to 50.43% odds, which means 0.618 isn't the best value of y specifically for beating x = 0.5. I think you could make an argument that y = 7/12 = 0.583 would be a good answer too, since that is the value of y that maximizes the odds of beating x = 0.5, and I would bet a large percentage of opponents in a real game would choose 0.5 for the cutoff, reasoning that that's the point where they have a 50% chance of improving their number.
You're right, 0.583 is a very good threshold. Against 0.5, it gives a 50.5% probability of winning, while 0.618 beats 0.5 only 50.4% of the time. And even against 0.618, 0.583 will win 49.3% of the time.

I made a mistake when I said that when x = ɸ, the first derivative is positive. But it still looks like x = ɸ is always a winning strategy.
Слава Україні!

User avatar
smilergrogan
Posts: 1529
Joined: Thu Jan 24, 2008 1:22 pm
Location: under a big W

Re: Interesting Math Puzzle from 538.com

#31 Post by smilergrogan » Tue Mar 08, 2016 5:39 pm

jarnon wrote:
smilergrogan wrote:Very good - thank you! I am heartened to see that my crummy method actually calculated the real odds pretty well. I miscalculated for x = 0.5 vs. y = 0.7, and the correct answer matches up exactly with the one calculated from the expression above, as do the others, except for some rounding error (x = 0.5 vs. y = 0.618 actually works out to 49.57% to 50.43% odds, which means 0.618 isn't the best value of y specifically for beating x = 0.5. I think you could make an argument that y = 7/12 = 0.583 would be a good answer too, since that is the value of y that maximizes the odds of beating x = 0.5, and I would bet a large percentage of opponents in a real game would choose 0.5 for the cutoff, reasoning that that's the point where they have a 50% chance of improving their number.
You're right, 0.583 is a very good threshold. Against 0.5, it gives a 50.5% probability of winning, while 0.618 beats 0.5 only 50.4% of the time. And even against 0.618, 0.583 will win 49.3% of the time.

I made a mistake when I said that when x = ɸ, the first derivative is positive. But it still looks like x = ɸ is always a winning strategy.
It's also interesting to me that the one cutoff value that always gives you a 50% or better chance of winning is also the one value that equals the resulting expectation value for the final number. There must be some deep significance to that (which has to be related to the definition of the golden ratio).

User avatar
Bob78164
Bored Moderator
Posts: 22159
Joined: Mon Oct 08, 2007 12:02 pm
Location: By the phone

Re: Interesting Math Puzzle from 538.com

#32 Post by Bob78164 » Tue Mar 08, 2016 6:39 pm

smilergrogan wrote:
jarnon wrote:
smilergrogan wrote:Very good - thank you! I am heartened to see that my crummy method actually calculated the real odds pretty well. I miscalculated for x = 0.5 vs. y = 0.7, and the correct answer matches up exactly with the one calculated from the expression above, as do the others, except for some rounding error (x = 0.5 vs. y = 0.618 actually works out to 49.57% to 50.43% odds, which means 0.618 isn't the best value of y specifically for beating x = 0.5. I think you could make an argument that y = 7/12 = 0.583 would be a good answer too, since that is the value of y that maximizes the odds of beating x = 0.5, and I would bet a large percentage of opponents in a real game would choose 0.5 for the cutoff, reasoning that that's the point where they have a 50% chance of improving their number.
You're right, 0.583 is a very good threshold. Against 0.5, it gives a 50.5% probability of winning, while 0.618 beats 0.5 only 50.4% of the time. And even against 0.618, 0.583 will win 49.3% of the time.

I made a mistake when I said that when x = ɸ, the first derivative is positive. But it still looks like x = ɸ is always a winning strategy.
It's also interesting to me that the one cutoff value that always gives you a 50% or better chance of winning is also the one value that equals the resulting expectation value for the final number. There must be some deep significance to that (which has to be related to the definition of the golden ratio).
I expect that's also the cutoff that maximizes expectation value. Perhaps that's a simpler way to reach the solution -- prove that maximizing expectation value solves the problem and then locate the maximum. --Bob
"Question with boldness even the existence of a God; because, if there be one, he must more approve of the homage of reason than that of blindfolded fear." Thomas Jefferson

User avatar
Bob Juch
Posts: 27132
Joined: Mon Oct 08, 2007 11:58 am
Location: Oro Valley, Arizona
Contact:

Re: Interesting Math Puzzle from 538.com

#33 Post by Bob Juch » Tue Mar 08, 2016 7:15 pm

Congratulations! I couldn't begin to solve this and I was an AP math major at UCLA. Of course, that was over45 years ago.
I may not have gone where I intended to go, but I think I have ended up where I needed to be.
- Douglas Adams (1952 - 2001)

Si fractum non sit, noli id reficere.

Teach a child to be polite and courteous in the home and, when he grows up, he'll never be able to drive in New Jersey.

User avatar
Bob78164
Bored Moderator
Posts: 22159
Joined: Mon Oct 08, 2007 12:02 pm
Location: By the phone

Re: Interesting Math Puzzle from 538.com

#34 Post by Bob78164 » Tue Mar 08, 2016 11:13 pm

Bob78164 wrote:
smilergrogan wrote:]It's also interesting to me that the one cutoff value that always gives you a 50% or better chance of winning is also the one value that equals the resulting expectation value for the final number. There must be some deep significance to that (which has to be related to the definition of the golden ratio).
I expect that's also the cutoff that maximizes expectation value. Perhaps that's a simpler way to reach the solution -- prove that maximizing expectation value solves the problem and then locate the maximum. --Bob
My expectation was wrong. It's fairly easy to see that 0.5 is the cutoff that maximizes expectation value. --Bob
"Question with boldness even the existence of a God; because, if there be one, he must more approve of the homage of reason than that of blindfolded fear." Thomas Jefferson

User avatar
TheConfessor
Posts: 6462
Joined: Mon Oct 08, 2007 1:11 pm

Re: Interesting Math Puzzle from 538.com

#35 Post by TheConfessor » Thu Mar 10, 2016 4:22 pm

If anyone has an appetite for more math and some free pizza, check out Pizza Hut's math contest in honor of Pi Day.
http://www.mystatesman.com/news/enterta ... e-p/nqhhK/

In case that link doesn't work for you, this one should.
http://www.cnbc.com/2016/03/09/pizza-hu ... ntest.html

User avatar
jarnon
Posts: 7003
Joined: Tue Oct 09, 2007 9:52 pm
Location: Merion, Pa.

Re: Interesting Math Puzzle from 538.com

#36 Post by jarnon » Fri Mar 11, 2016 9:07 am

smilergrogan wrote:It's also interesting to me that the one cutoff value that always gives you a 50% or better chance of winning is also the one value that equals the resulting expectation value for the final number. There must be some deep significance to that (which has to be related to the definition of the golden ratio).
The answer has been posted, and smiler's observation is indeed not a coincidence:
Let C be the optimal cutoff the players use. The key observation is that if the first number revealed is exactly C, then the probability of winning by keeping C equals the probability of winning by pressing the button again — you are indifferent.
Using this key observation, which is equivalent to smiler's, yields a simple quadratic equation whose solution is 0.618. Other readers solved it the "hard way" and generated pretty pictures of hyperbolic paraboloids.
Слава Україні!

User avatar
smilergrogan
Posts: 1529
Joined: Thu Jan 24, 2008 1:22 pm
Location: under a big W

Re: Interesting Math Puzzle from 538.com

#37 Post by smilergrogan » Fri Mar 11, 2016 11:54 am

jarnon wrote:
smilergrogan wrote:It's also interesting to me that the one cutoff value that always gives you a 50% or better chance of winning is also the one value that equals the resulting expectation value for the final number. There must be some deep significance to that (which has to be related to the definition of the golden ratio).
The answer has been posted, and smiler's observation is indeed not a coincidence:
Let C be the optimal cutoff the players use. The key observation is that if the first number revealed is exactly C, then the probability of winning by keeping C equals the probability of winning by pressing the button again — you are indifferent.
Using this key observation, which is equivalent to smiler's, yields a simple quadratic equation whose solution is 0.618. Other readers solved it the "hard way" and generated pretty pictures of hyperbolic paraboloids.
I understand how the solutions are algebraically the same for the question "what cutoff gives a probability of winning that is equal whether you stick or roll again? (assuming your opponent is using perfect strategy)" and my observation "what cutoff yields itself as the expectation value for the final number?": both result in the equation c^2 + c -1 = 0, yielding c = 0.618 (for c > 0). But I guess my question is is there some deeper equivalence to those two questions - is there a way to conceptualize the problem starting from my observation in order to explain how to arrive at the final answer, or is it just a mathematical coincidence? And is there some way to conceptualize the problem to explain why the golden ratio is the answer - how does the problem match up with the definition of the golden ratio, again other than just by a mathematical coincidence. Is there really such a thing as a mathematical coincidence? Probably I am asking for too much.

Also, the way the problem was introduced as a game show scenario suggests the answer should include some accounting for what real world players would do. Obviously since that can't be perfectly known, the only way to have one correct answer is to assume perfectly rational behavior by the opponent, sort of like economic theories that assume perfect economic behavior (according to some definition) vs. those that use data to account for actual behavior of people.

User avatar
Bob78164
Bored Moderator
Posts: 22159
Joined: Mon Oct 08, 2007 12:02 pm
Location: By the phone

Re: Interesting Math Puzzle from 538.com

#38 Post by Bob78164 » Fri Mar 11, 2016 1:27 pm

jarnon wrote:
smilergrogan wrote:It's also interesting to me that the one cutoff value that always gives you a 50% or better chance of winning is also the one value that equals the resulting expectation value for the final number. There must be some deep significance to that (which has to be related to the definition of the golden ratio).
The answer has been posted, and smiler's observation is indeed not a coincidence:
Let C be the optimal cutoff the players use. The key observation is that if the first number revealed is exactly C, then the probability of winning by keeping C equals the probability of winning by pressing the button again — you are indifferent.
Using this key observation, which is equivalent to smiler's, yields a simple quadratic equation whose solution is 0.618. Other readers solved it the "hard way" and generated pretty pictures of hyperbolic paraboloids.
I don't understand why the "key observation" is true. --Bob
"Question with boldness even the existence of a God; because, if there be one, he must more approve of the homage of reason than that of blindfolded fear." Thomas Jefferson

Post Reply