A fun little probability puzzle for you.

What is the basis for reason? And mathematics?

Moderators: AMod, iMod

Flannel Jesus
Posts: 4302
Joined: Mon Mar 28, 2022 7:09 pm

Re: A fun little probability puzzle for you.

Post by Flannel Jesus »

Sculptor wrote: Sat Jul 16, 2022 6:24 pm
Flannel Jesus wrote: Sat Jul 16, 2022 10:21 am How do you figure Sculptor?

Because it is a version of the Monty Hall problem where having made a choice it is best to change course.
It is indeed quite similar to the Monty hall problem.

However, I cannot see any way that you could possibly derive a greater than 50% probability that the remaining bill is a $1. That's why I was curious to see your reasoning there.
User avatar
Sculptor
Posts: 8859
Joined: Wed Jun 26, 2019 11:32 pm

Re: A fun little probability puzzle for you.

Post by Sculptor »

Flannel Jesus wrote: Sat Jul 16, 2022 6:34 pm
Sculptor wrote: Sat Jul 16, 2022 6:24 pm
Flannel Jesus wrote: Sat Jul 16, 2022 10:21 am How do you figure Sculptor?

Because it is a version of the Monty Hall problem where having made a choice it is best to change course.
It is indeed quite similar to the Monty hall problem.

However, I cannot see any way that you could possibly derive a greater than 50% probability that the remaining bill is a $1. That's why I was curious to see your reasoning there.
The switcheroo has already occurred, the prob cannot be the obvious 50%.
Flannel Jesus
Posts: 4302
Joined: Mon Mar 28, 2022 7:09 pm

Re: A fun little probability puzzle for you.

Post by Flannel Jesus »

I agree that it's not 50%. I'm just struggling to see how you determined it was MORE than 50%, and not less.

I also don't really know what you mean by "switcheroo". What was switched in the scenario?
bobmax
Posts: 596
Joined: Fri Jun 03, 2022 7:38 am

Re: A fun little probability puzzle for you.

Post by bobmax »

The difficulty comes from assuming that you know what you don't really know.

In fact, we only know that a $ 100 bill was pulled from one of the two boxes.
Nothing more is known.

Because the $ 100 bill doesn't add any other box-related knowledge.
Which remain equivalent.

A $ 1 bill would have been different.

The two boxes remain in the game.

The remaining bills are two $ 100 and one $ 1. All with equal probability.
Flannel Jesus
Posts: 4302
Joined: Mon Mar 28, 2022 7:09 pm

Re: A fun little probability puzzle for you.

Post by Flannel Jesus »

bobmax wrote: Sat Jul 16, 2022 9:40 pm In fact, we only know that a $ 100 bill was pulled from one of the two boxes.
Nothing more is known.

Because the $ 100 bill doesn't add any other box-related knowledge.
I think the $100 does give us (incomplete, imperfect, probabilistic) information about which box we initially selected. If I make a more extreme example, I think you'll agree.

Instead of two boxes with two bills each, imagine I had two bags with 50 coloured balls each. One of the bags has 50 blue balls. The other bag has 1 blue ball, and 49 red balls. I present you the two bags, you don't know which one is which, so you choose one bag at random. Then you stick your hand in and pick out one ball at random. The one ball you picked out is blue.

Does the fact that you selected a blue ball give you any possible information about what bag you selected? Are you more likely to have selected the bag full of blue balls, once you see that you've selected a blue ball? Or are you just as likely to have selected the bag with 49 red balls?
bobmax
Posts: 596
Joined: Fri Jun 03, 2022 7:38 am

Re: A fun little probability puzzle for you.

Post by bobmax »

Flannel Jesus wrote: Sat Jul 16, 2022 9:49 pm
bobmax wrote: Sat Jul 16, 2022 9:40 pm In fact, we only know that a $ 100 bill was pulled from one of the two boxes.
Nothing more is known.

Because the $ 100 bill doesn't add any other box-related knowledge.
I think the $100 does give us (incomplete, imperfect, probabilistic) information about which box we initially selected. If I make a more extreme example, I think you'll agree.

Instead of two boxes with two bills each, imagine I had two bags with 50 coloured balls each. One of the bags has 50 blue balls. The other bag has 1 blue ball, and 49 red balls. I present you the two bags, you don't know which one is which, so you choose one bag at random. Then you stick your hand in and pick out one ball at random. The one ball you picked out is blue.

Does the fact that you selected a blue ball give you any possible information about what bag you selected? Are you more likely to have selected the bag full of blue balls, once you see that you've selected a blue ball? Or are you just as likely to have selected the bag with 49 red balls?
In this case the bag with the 49 red balls no longer offers a 1/2 and 1/2 probability as in the previous case.

So the draw of a blue ball is much more likely to involve the bag with the 50 blue balls.

In fact, the previous case was an extreme case...
Flannel Jesus
Posts: 4302
Joined: Mon Mar 28, 2022 7:09 pm

Re: A fun little probability puzzle for you.

Post by Flannel Jesus »

Right, the fact that you drew a blue ball gives you imperfect information about what bag you're likely to have chosen. Imperfect because you still MIGHT have chosen the bag with 49 red balls, and then just lucked into hitting the only blue ball in that bag -- that's still a realistic posssibility. But, we can easily recognize that it's less probable, and that it's more probably the case that you chose the bag completely full of blue balls.

The same principle, in my opinion, applies to the original question. The fact that you selected a $100 bill gives you a slight probabilistic inclination to think that you likely did choose the box with 2x $100, and less probable that you chose the box that only has 1x $100 and 1x $1.
Impenitent
Posts: 5774
Joined: Wed Feb 10, 2010 2:04 pm

Re: A fun little probability puzzle for you.

Post by Impenitent »

but there is a 100% chance you have a box

-Imp
Skepdick
Posts: 16022
Joined: Fri Jun 14, 2019 11:16 am

Re: A fun little probability puzzle for you.

Post by Skepdick »

The probability is ≈0.666663 (n=1000000)

How do I know? Empirically. I did the experiment a million times and kept score.

Code: Select all

from random import shuffle
from copy import deepcopy

boxes = [ [100,100], [100,1]]
other_note_was_1=0
other_note_was_100=0

# Perform the experiment a million times
for _ in range(1000000):
    shuffle(boxes) # Shake!
    shuffle(boxes[0]) # Shake!
    shuffle(boxes[1]) # Shake!
    box = boxes[0] # Grab one of the two boxes
    note = box[0] # Grab one of the two notes in the box
    if note==100:
        # If the note is 100 observe the other note and keep count of its denomination.
        if box[1] == 1:
            other_note_was_1 +=1
        else:
            other_note_was_100 += 1
    else:
        # Challenge doesn't tell us what to do here.
        pass

probability = float(other_note_was_100) / (other_note_was_100 + other_note_was_1)
print(probability)
Or you could just do the boring thing and use the formulas for conditional probability.
bobmax
Posts: 596
Joined: Fri Jun 03, 2022 7:38 am

Re: A fun little probability puzzle for you.

Post by bobmax »

Flannel Jesus wrote: Sat Jul 16, 2022 11:30 pm Right, the fact that you drew a blue ball gives you imperfect information about what bag you're likely to have chosen. Imperfect because you still MIGHT have chosen the bag with 49 red balls, and then just lucked into hitting the only blue ball in that bag -- that's still a realistic posssibility. But, we can easily recognize that it's less probable, and that it's more probably the case that you chose the bag completely full of blue balls.

The same principle, in my opinion, applies to the original question. The fact that you selected a $100 bill gives you a slight probabilistic inclination to think that you likely did choose the box with 2x $100, and less probable that you chose the box that only has 1x $100 and 1x $1.
Yes,
what I was trying to say is that the probability of taking a $ 100 bill out of the box with two $ 100 is twice that of taking it out of the other box.

The actual extraction changes nothing of this situation.

Instead, one is mistakenly led to believe that this extraction has an influence.
Flannel Jesus
Posts: 4302
Joined: Mon Mar 28, 2022 7:09 pm

Re: A fun little probability puzzle for you.

Post by Flannel Jesus »

bobmax wrote: Sun Jul 17, 2022 1:58 am The actual extraction changes nothing of this situation.

Instead, one is mistakenly led to believe that this extraction has an influence.
What extraction? You mean the fact that you selected the $100 bill changes nothing? Of course it does, it changes everything. The alternative is that the first bill you selected was a $1, in which case you'd be guaranteed that the remaining bill is $100
bobmax wrote: what I was trying to say is that the probability of taking a $ 100 bill out of the box with two $ 100 is twice that of taking it out of the other box.
Oh my mistake, you saying that you "don't have any extra box related knowledge" made me think you were saying 50/50. This happens to be correct, it's a 1/3 chance to select a 1 and a 2/3 chance to select a 100
Flannel Jesus
Posts: 4302
Joined: Mon Mar 28, 2022 7:09 pm

Re: A fun little probability puzzle for you.

Post by Flannel Jesus »

Skepdick wrote: Sun Jul 17, 2022 12:34 am The probability is ≈0.666663 (n=1000000)

How do I know? Empirically. I did the experiment a million times and kept score.

Code: Select all

from random import shuffle
from copy import deepcopy

boxes = [ [100,100], [100,1]]
other_note_was_1=0
other_note_was_100=0

# Perform the experiment a million times
for _ in range(1000000):
    shuffle(boxes) # Shake!
    shuffle(boxes[0]) # Shake!
    shuffle(boxes[1]) # Shake!
    box = boxes[0] # Grab one of the two boxes
    note = box[0] # Grab one of the two notes in the box
    if note==100:
        # If the note is 100 observe the other note and keep count of its denomination.
        if box[1] == 1:
            other_note_was_1 +=1
        else:
            other_note_was_100 += 1
    else:
        # Challenge doesn't tell us what to do here.
        pass

probability = float(other_note_was_100) / (other_note_was_100 + other_note_was_1)
print(probability)
Or you could just do the boring thing and use the formulas for conditional probability.
I appreciate this approach. I don't think figuring it out analytically is boring, but I admire the experimental approach just as well. You are correct, you've approximated the probability very closely.

[edit] converted your code to Javascript, it will come useful for me for verifying my solution to the second puzzle

https://jsfiddle.net/hbxnj850/1/
Last edited by Flannel Jesus on Sun Jul 17, 2022 9:10 am, edited 1 time in total.
Flannel Jesus
Posts: 4302
Joined: Mon Mar 28, 2022 7:09 pm

Re: A fun little probability puzzle for you.

Post by Flannel Jesus »

bobmax wrote: Sat Jul 16, 2022 9:40 pm The difficulty comes from assuming that you know what you don't really know.

In fact, we only know that a $ 100 bill was pulled from one of the two boxes.
Nothing more is known.

Because the $ 100 bill doesn't add any other box-related knowledge.
Which remain equivalent.

A $ 1 bill would have been different.

The two boxes remain in the game.

The remaining bills are two $ 100 and one $ 1. All with equal probability.
I would like to challenge you to apply your logic to a second, similar but different puzzle:

This scenario is just like the first, but instead of 2 boxes, there are 3 boxes.
1 box has $1 and $100
1 box has $1 and $100
1 box has $100 and $100

Just like the first scenario, in this scenario you choose a box, essentially at random - you have no idea if you chose the box with 2x $100 or if you chose one of the 1 + 100 boxes. And once again, you pick out a bill at random, and you happen to find that you picked a $100.

So, just as in the first scenario, the question is, what' the probability that the other bill remaining in the box is also $100?
bobmax
Posts: 596
Joined: Fri Jun 03, 2022 7:38 am

Re: A fun little probability puzzle for you.

Post by bobmax »

Flannel Jesus wrote: Sun Jul 17, 2022 8:58 am
bobmax wrote: Sat Jul 16, 2022 9:40 pm The difficulty comes from assuming that you know what you don't really know.

In fact, we only know that a $ 100 bill was pulled from one of the two boxes.
Nothing more is known.

Because the $ 100 bill doesn't add any other box-related knowledge.
Which remain equivalent.

A $ 1 bill would have been different.

The two boxes remain in the game.

The remaining bills are two $ 100 and one $ 1. All with equal probability.
I would like to challenge you to apply your logic to a second, similar but different puzzle:

This scenario is just like the first, but instead of 2 boxes, there are 3 boxes.
1 box has $1 and $100
1 box has $1 and $100
1 box has $100 and $100

Just like the first scenario, in this scenario you choose a box, essentially at random - you have no idea if you chose the box with 2x $100 or if you chose one of the 1 + 100 boxes. And once again, you pick out a bill at random, and you happen to find that you picked a $100.

So, just as in the first scenario, the question is, what' the probability that the other bill remaining in the box is also $100?
1/2

The probability of a box being chosen is 1/3.

That 100 comes out of a box with 100 and 1 the probability is 1/2.
While on the other box the probability is 1.

If you draw 100, each of the first two boxes has probability 1/6 (1/2 * 1/3)

While the other has probability 1/3 (1 * 1/3)

Therefore 1/6 + 1/6 = 1/3
Flannel Jesus
Posts: 4302
Joined: Mon Mar 28, 2022 7:09 pm

Re: A fun little probability puzzle for you.

Post by Flannel Jesus »

Well, my mans is on fire, you got it right. I must have misunderstood your reasoning process

Yes, there's a 1/2 chance you chose the box with 2x 100s in the second scenario
Post Reply