Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
Update: OK I'm re-reading everything and I'm still not sure that I understand it after all.. *sigh*..

For those that don't get it, like I didn't, realize that we're making one important assumption here: that both parties know the upper and lower bounds of the numbers!

Sure, if we know we're working from 0 .. 100, and the envelope we see is number 88, odds are, it's the higher of the two envelopes (assuming both are truly random; this can be defeated if the "dealer" keeps writing two consecutive numbers or otherwise knows the trick). Now I look at the situation and think, "Well yah, duh."

But what if you don't know the upper bounds? Modify the lines in the script like below, and the odds come out to exactly 50%: what we'd expect. The way *I* would play this game in real life, without knowing the limit, is to try to "figure out" the limit as I go, but statistically, given a one-time shot, we have to assume that the number we were given is, on average, mid-way through the distribution. This means that no matter what number we think of, we're still 50% likely of guessing right.

... $letter1 = $money[rand @money / 2]; { $letter2 = $money[rand @money / 2]; redo if $letter1 == $letter2; + } ... { $guess = $money[rand (($letter2+1) * 2)]; redo if $guess == $lette +r2; } ...
But if we know we're going to play 100 games, we can sorta "figure out" the upper limit as we go (assuming there is one, and it's kept constant during play), by assuming that our numbers will average out to be mid-way through the distribution. That would let us approach a higher probability of being correct further down the line. The script can be modified to play by those rules too, but I'll leave that as an exercise for the reader.

If you were to actually make these bold statements and try them in real life (give them 10 cards, pick two at random, show me one and I'll guess 66% correctly whether it's the higher of the two cards), I would seriously hope that they would figure out the trick without me needing to guess very much, if at all. If they were smart, they'd shut up when they figured it out and would keep pulling, say 9 and 10, and showing me the 9 all the time.


In reply to OK, understood, but still 1 *huge* flaw by Fastolfe
in thread Spooky math problem by tilly

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others avoiding work at the Monastery: (15)
    As of 2014-12-22 17:09 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      Is guessing a good strategy for surviving in the IT business?





      Results (121 votes), past polls