[HN Gopher] The math behind mind-reading tricks
       ___________________________________________________________________
        
       The math behind mind-reading tricks
        
       Author : theafh
       Score  : 84 points
       Date   : 2022-05-27 14:12 UTC (8 hours ago)
        
 (HTM) web link (www.quantamagazine.org)
 (TXT) w3m dump (www.quantamagazine.org)
        
       | bern4444 wrote:
       | My own fun math mind reading trick:
       | https://sambernheim.com/blog/the-party-math-trick
        
       | kick_in_the_dor wrote:
       | I came here for magic tricks and was disappointed.
        
         | curiousgal wrote:
         | What is your partner's age? Add two zeros to the end. Minus
         | your birth year from that number. Add the current year to this
         | equation. The result should be yours and your partner's current
         | ages.
        
           | Someone wrote:
           | Not if the one asked to do that calculation hasn't had their
           | birthday yet this year (in which case "current year - birth
           | year" doesn't yield age in years) or their birth year was
           | over 99 years ago (in which case adding "current year - birth
           | year" overflows into the partner's age)
        
           | neogodless wrote:
           | Close but not quite. If it helps, both birthdays have not
           | occurred yet this year. If I assume BOTH have, the trick
           | works.
        
         | aaaaaaaaaaab wrote:
         | Here's a trick I came up with: 1. think of any number! 2. Add
         | your age to the number! 3. Subtract the original number!
         | 
         |  _magical hand motions_
         | 
         | The result is your age!
        
       | nestorD wrote:
       | Fun fact, about a hundred years ago, some pseudo-mediums would
       | use a similar kind of math trick to "guess" the number of
       | _deceased_ brother and sisters of someone coming to see them in
       | order to do a Seance.
       | 
       | Morality aside, discovering that highly surprised me because I
       | always thought that those techniques were transparent to all
       | people. But I guess math literacy in the US wasn't always
       | great...
        
         | Swizec wrote:
         | Statistics and probabilities are incredibly unintuitive to
         | people. That's why it's called The Birthday Paradox and not the
         | birthday obvious result
         | 
         | > The birthday paradox is that, counterintuitively, the
         | probability of a shared birthday exceeds 50% in a group of only
         | 23 people.
         | 
         | https://en.m.wikipedia.org/wiki/Birthday_problem
        
           | WhitneyLand wrote:
           | They are deceptively unintuitive also. I went back to the
           | Monty Hall problem more than once after I previously thought
           | I had it figured out:
           | 
           | Suppose you're on a game show, and given the choice of three
           | doors: Behind one door is a car; behind the others, goats.
           | You pick a door, say No. 1, and the host, who knows what's
           | behind the doors, opens another door, say No. 3, which has a
           | goat. He then says to you, "Do you want to pick door No. 2?"
           | Is it to your advantage to switch your choice?
           | 
           | https://en.wikipedia.org/wiki/Monty_Hall_problem
        
             | pchristensen wrote:
             | Here's how I was able to understand it. There are 100
             | doors, you choose 1, then host opens 98 doors with goats.
             | Do you keep your door or take the 1 remaining?
             | 
             | In the original, the 3 doors muddles the odds. But with
             | 100, you're choosing between the 1 you chose on the first
             | try, or the 99 you didn't choose.
        
               | jwilk wrote:
               | This doesn't help my intuition at all.
        
               | derriz wrote:
               | You're actually being given the choice between "my
               | initial pick contains the prize" or "the prize is
               | contained in any of the other 99 boxes". Okay - the host
               | does a routine to add to the "drama" by revealing 98 non-
               | prize boxes but since he will never reveal the prize
               | during this process, he isn't giving you any more
               | information.
        
               | quesera wrote:
               | This is how I think about it:
               | 
               | * Your first choice had a natural chance of 1% to be
               | correct.
               | 
               | * After eliminating the 98 other options, a random choice
               | of the remaining two is 50% likely to be correct.
               | 
               | * BUT, you know that the _reason_ the door you picked was
               | not opened is because you picked it! Its inclusion in the
               | set-of-two is _not_ random.
               | 
               | * So your first choice is isn't any more likely to be
               | correct that it was when you first you chose it.
        
               | patrickdavey wrote:
               | The way I think about it (which I hope is correct): when
               | you first chose your probability of guessing correctly
               | was 1 in 100. It doesn't magically become 1 in 2 when the
               | other 98 doors are opened.
        
               | lijogdfljk wrote:
               | Funny, i think (but am not arguing i'm correct) it _does_
               | change probability when the doors change. As i
               | explained[1] in the sister post.
               | 
               | Perhaps this is some mathematical concept? To me i'm
               | viewing every choice as a dice roll. I have no question
               | that the first dice roll was worse than the 2nd. However
               | to me the 2nd is a die with two faces. Two choices, of
               | which both are equally possible.
               | 
               | To look at it differently. The doors changing probability
               | to me sounds like.. imagine two people, the PersonA has
               | this primary scenario. They had 100 doors, chose one, and
               | are then asked if they'd like to switch. PersonB then is
               | asked the second question, of the 2 doors, which do they
               | want? PersonA and B are standing next to each other. The
               | doors are the same for both of them. Why would PersonA
               | have different odds than PersonB? And how could PersonB's
               | odds be any different than 50/50 with no prior history of
               | the doors?
               | 
               | Is there some fundamental difference between the grand
               | idea of probability and "reality" as i'm trying to
               | describe it here?
               | 
               | [1]: https://news.ycombinator.com/item?id=31535557
        
               | lijogdfljk wrote:
               | Man, i still don't get it. Well, maybe i do? :shrug:
               | 
               | The way i see it, the other door has a higher chance of
               | being correct than the door you _originally_ chose.
               | However the two are fundamentally different, are they
               | not?
               | 
               | In reality both doors are equally likely to be correct,
               | no? So yes, changing would be better compared to your
               | original answer - but "to change or not" evaluates both
               | doors in my mind, and each is a 50% chance, no?
               | 
               | Which i _think_ is what you 're saying here:
               | 
               | > So your first choice is isn't any more likely to be
               | correct that it was when you first you chose it.
               | 
               | But nevertheless the problem has me a bit confused in
               | what is expected to be "right". It seems to me there is
               | no right, it is a 50/50, unless you are strictly
               | answering the moot point of "Which is better? The door
               | you first chose, or the potential other door?".
               | 
               | Ie i guess i view the original choice as irrelevant the
               | moment the variables change. I feel i misunderstand the
               | goal of the "problem".
        
               | vitus wrote:
               | Or, an even more telling variation:
               | 
               | You pick door #1.
               | 
               | The host goes and, in order, one by one, opens doors
               | 2-52, conspicuously skips door 53, and then opens 54-100.
               | Would you like to stick with your original choice?
        
               | cgriswald wrote:
               | I think this variation makes it more intuitively clear
               | one should switch in the case with 100 doors, but I think
               | it makes the explanation of _why_ less clear because of
               | the extra, unnecessary information.
        
           | criddell wrote:
           | I've never been able to wrap my head around this one.
           | 
           | If in a group 23 people at least two share a birthday with a
           | ~50% chance, would that mean if I have a group of 22 people
           | and pick a random day of the year, there's also a ~50% chance
           | of somebody having a birthday on that day?
        
             | erehweb wrote:
             | No. There's about a 22/365 chance that somebody has a
             | birthday on that day. But this is getting close to the
             | intuition. Go through the 23 people. For each one of them,
             | there's about a 22/365 somebody else in the group has the
             | same birthday as they do. So adding these probabilities up
             | over all 23, you get 23 * 22/365. Of course, adding up the
             | probabilities is obviously wrong since the events are not
             | independent (and 23 * 22/365 > 1) but it gives the
             | intuition that the probability of a shared birthday grows
             | like N^2. [and actually, you can add up expectations]
             | [Edits for correctness]
        
               | [deleted]
        
               | [deleted]
        
             | whatever1 wrote:
             | For all these problems I find it easier to just simulate it
             | and plot the results. Do a loop with 100k iterations. In
             | each iteration generate 23 numbers between 1,365 from a
             | uniform distribution. Then check in how many iterations you
             | had duplicate entries.
             | 
             | You will see that asymptomatically you will reach 50k cases
        
               | conanite wrote:
               | Covid cases are asymptomatically approaching zero.
               | However, your duplicate entries will reach their target
               | _asymptotically_ :)
               | 
               | https://en.wikipedia.org/wiki/Asymptote
        
               | whatever1 wrote:
               | I know, Apple keyboard does not.
        
             | dhosek wrote:
             | I think the easiest way to think about it is to invert the
             | problem. What is the probability that no one shares a
             | birthday?
             | 
             | One person, nobody shares a birthday because they're alone.
             | 
             | Two people, it's going to be a 364/365 [?] 99.7% that they
             | don't share a birthday.1
             | 
             | Now add a third person. We have the initial probability for
             | the first pair and then the third person can't share a
             | birthday with either of them, so the probability is going
             | to be 363/365 that they don't share a birthday with either,
             | but since we have two events that both must occur, we
             | multiply the probabilities. That gives us (363 _364) /3652
             | [?] 99.2%
             | 
             | For the fourth person it becomes (362_363 _364) /3653 [?]
             | 98.4%
             | 
             | You'll notice that the probability is decreasing more and
             | more with each step.2
             | 
             | In general, for _n* people we would have3 _P_ = 365!
             | /((365- _n_!)365n). At _n_ = 23, we drop below 50%.
             | 
             | This technique is useful for a lot of statistical
             | calculations, e.g., for calculating the probabilities of
             | poker hands, some of them are easier to calculate the
             | probability of not getting the hand then the probability of
             | getting the hand (a pair being the most obvious case).
             | 
             | [?]
             | 
             | 1. We're mostly programmers here so we're going to pretend
             | leap years don't exist.
             | 
             | 2. This will not continue indefinitely, obviously. The
             | first derivative hits a minimum4 around _n_ = 20 for this
             | formula and at _n=365_. The graph kind of looks like cos th
             | over the range [0,p] but not exactly, it's just the first
             | well-known graph that comes to mind of this shape.
             | 
             | 3. If you're eagle eyed, you might notice that my examples
             | before had a denominator of 365 raised to the _n_ -1 power.
             | Then you'll also notice that my factorials have _n_ terms
             | and end with 365 and not 364. Remember our lonely birthday
             | dude? His probability of not sharing a birthday (1) can be
             | thought of as 365 /365 and should also be part of the
             | product, but when we're doing the math for small numbers,
             | it's easier to just ignore that but for a general formula,
             | keeping him in the product makes the formula clearer.
             | 
             | 4. Minimum because we're _decreasing_ , remember.
        
             | bena wrote:
             | Statistics aren't reflective. They're aggregate.
             | 
             | It's not a 50% chance of being on the date you chose, but
             | that any two dates are the same.
             | 
             | If you pick a random date, Alice has a 364/365 chance of
             | _not_ having a birthday that day. Bob has a 363 /365 chance
             | of not having a birthday on that day or on Alice's birthday
             | independently of whether or not Alice's birthday is on the
             | random date. So we take Alice's chances and Bob's chances
             | and we can multiply them together to get our odds that none
             | of these people share a date. And of course, if we know the
             | odds of something not happening, the odds of it happening
             | is the opposite.
        
             | munificent wrote:
             | The trick is to realize that "same birthday" isn't a
             | property of _people_ , it's a question about _pairs_ of
             | people.
             | 
             | A group of 23 people has 253 unique pairs. So if I ask, "In
             | a room with 253 pairs of people, what are the odds that in
             | one of those pairs, both have the same birthday?" Now
             | around 50% seems a lot more intuitive.
             | 
             | It's unintuitive because the number of pairs increases
             | quadratically with the number of people.
        
             | dwighttk wrote:
             | that's just 1 date that has to be matched, so you get a
             | lower probability of matching, comparing 22 dates to 1...
             | in the 23 person scenario, you have 23 dates that can match
             | with any of the 23 dates.
        
             | andi999 wrote:
             | No. The chance would be much smaller. If you choose 22
             | random days though...
        
               | criddell wrote:
               | Your comment and erehweb's finally made it click for me.
               | Thanks.
        
       | charcircuit wrote:
       | I was expecting an article talking about probability instead of
       | algebra. People are bad at coming up with random numbers
       | especially if you put some restrictions on what number they are
       | allowed to generate.
        
       | vincnetas wrote:
       | show me a kid that can multiply by 13 tree digit number in theyr
       | head and that would be enough magic trick for me :)
        
         | cgriswald wrote:
         | Define 'kid.' By middle school, at least, I could have done
         | that even without the (10x + 3x) simplification.
         | 
         | The real trick would be finding a three digit number that can
         | be multiplied by 77 and still be a three digit number.
        
       | slingnow wrote:
       | I don't think any one of these could be classified as a "mind-
       | reading magic trick".
        
       ___________________________________________________________________
       (page generated 2022-05-27 23:00 UTC)