[Bayes' Theorem] Finding the probability of guessing correctly

LokLe
Messages
37
Reaction score
5
Homework Statement
There are three boxes:
Box 1 contains one white ball and one black one.
Box 2 contains two white balls and one black one.
Box 3 contains three white balls and one black one.

Suppose I pick one box, then I pick a ball at random from this box and I show you the ball. Suppose the ball is white.
Which box would you guess it came from? What is your probability of guessing right?
Relevant Equations
P(H|E) = P(H)P(E|H)/P(E)
I calculated the probability of box 1/2/3 given white.

P(Box 1 | white)
= P(Box 1)*P(White | Box 1)/(P(Box 1)*P(White | Box 1) + P(Not Box 1)*P(White | Not Box 1))
= ((1/3)*(1/2)) / (((1/3)*(1/2) + (2/3)*(5/7)
= 7/27

P(Box 2 | white)
= P(Box 2)*P(White | Box 2)/(P(Box 2)*P(White | Box 2) + P(Not Box 2)*P(White | Not Box 2))
= ((1/3)*(2/3)) / ((1/3)*(2/3) + (2/3)*(4/6))
= 1/3

P(Box 3 | white) = P(Box 3)*P(White | Box 3)/(P(Box 3)*P(White | Box 3) + P(Not Box 3)*P(White | Not Box 3)) =
= ((1/3)*(3/4)) / ((1/3)*(3/4) + (2/3)*(3/5))
= 5/13

Therefore, you should guess box 3.


The probabilities summed up are not equal to 1. Is this normal or are there mistakes in my calculation?

Thank you!
 
Physics news on Phys.org
There are mistakes in your calculation.

How do you compute P(white)?
 
I did not calculate P(white). Instead, I calculated P(Box (1/2/3) | white) + P(Not Box (1/2/3) | Not white)
 
LokLe said:
I did not calculate P(white). Instead, I calculated P(Box (1/2/3) | white) + P(Not Box (1/2/3) | Not white)
P(white) = P (total number of white balls/total number of balls) = 6/9 = 2/3
 
Are all balls drawn with equal probability?
 
  • Like
Likes FactChecker and PeroK
Orodruin said:
Are all balls drawn with equal probability?
No. In box 3, the probability of drawing a white ball is higher = 3/4.

In other boxes:
P(box 1) = 1/2
P(box 2) = 2/3
 
LokLe said:
No. In box 3, the probability of drawing a white ball is higher = 3/4.

In other boxes:
P(box 1) = 1/2
P(box 2) = 2/3
Not the probability of drawing a white ball, the probability of drawing any specific ball. For example, how do you compute P(white|not box 1)?
 
  • Like
Likes LokLe
What happens on average if you repeat the process ##36## times? That should give you the probability of drawing each ball.

And, in fact, all the data you need.
 
Last edited:
  • Like
Likes LokLe
PeroK said:
What happens on average if you repeat the process ##36## times? That should give you the probability of drawing each ball.
So I drew a tree diagram and found P(White | Not box (1/2/3)).
P(White | Not box 1) = 1/3*2/3 + 1/3*3/4 = 17/36
P(White | Not box 2) = 1/3*1/2 + 1/3*3/4 = 15/36
P(White | Not box 3) = 1/3*1/2 + 1/3*2/3 = 14/36

So by using these values:
P(Box 1 | white) = P(Box 1)*P(White | Box 1)/(P(Box 1)*P(White | Box 1) + P(Not Box 1)*P(White | Not Box 1))
= (1/3*1/2) / (1/3*1/2 + 17/36)
= 6/23

P(Box 2 | white) = P(Box 2)*P(White | Box 2)/(P(Box 2)*P(White | Box 2) + P(Not Box 2)*P(White | Not Box 2))
= (1/3*2/3) / (1/3*2/3 + 15/36)
= 8/23

P(Box 3 | white) = P(Box 3)*P(White | Box 3)/(P(Box 3)*P(White | Box 3) + P(Not Box 3)*P(White | Not Box 3))
= (1/3*3/4) / (1/3*3/4 + 14/36)
= 9/23

The answer is box 3.

This should be the correct answer. Thank you all for the help!
 
Last edited:
  • #10
From the 36 experiments:

Box 1 and white = 6
Box 2 and white = 8
Box 3 and white = 9

That gives you 23/36 as the probability of drawing a white ball. And the conditional probability of Box 1 given white as 6/23 etc.
 
  • #11
PeroK said:
From the 36 experiments:

Box 1 and white = 6
Box 2 and white = 8
Box 3 and white = 9

That gives you 23/36 as the probability of drawing a white ball. And the conditional probability of Box 1 given white as 6/23 etc.
How did you calculate, for example, box 1 and white?
 
  • #12
LokLe said:
How did you calculate, for example, box 1 and white?
Oh It is 1/2*1/3 = 1/6 = 6/36.
 
  • #13
PeroK said:
From the 36 experiments:

Box 1 and white = 6
Box 2 and white = 8
Box 3 and white = 9

That gives you 23/36 as the probability of drawing a white ball. And the conditional probability of Box 1 given white as 6/23 etc.
The main question is though: Do you understand why your original approach failed?

Edit: That was clearly intended to quote one of OP’s posts, not @PeroK ...
 
Last edited:
  • Like
Likes PeroK
  • #14
Orodruin said:
The main question is though: Do you understand why your original approach failed?
My original P(White | box (1/2/3)) is not correct since it is not just about calculating the number of white balls in other boxes. The whole case should be considered.
 
Back
Top