# [Bayes' Theorem] Finding the probability of guessing correctly

• LokLe
In summary: Also, the probability of drawing a white ball in each box is different. Therefore, the total number of white balls in each box and the total number of balls in each box should be taken into consideration.
LokLe
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!

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?

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)?

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:
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

This should be the correct answer. Thank you all for the help!

Last edited:
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.

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?

LokLe said:
How did you calculate, for example, box 1 and white?
Oh It is 1/2*1/3 = 1/6 = 6/36.

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:
PeroK
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.

## 1. What is Bayes' Theorem?

Bayes' Theorem is a mathematical formula that helps us calculate the probability of an event occurring based on prior knowledge or information.

## 2. How does Bayes' Theorem work?

Bayes' Theorem uses conditional probability to calculate the likelihood of an event occurring based on prior knowledge or information. It takes into account both the prior probability of the event and the new evidence that may affect the probability.

## 3. What is the significance of Bayes' Theorem in science?

Bayes' Theorem is widely used in the field of science, especially in fields such as statistics, biology, and psychology. It allows scientists to update their beliefs and predictions based on new evidence, making it a valuable tool for decision making and analysis.

## 4. How is Bayes' Theorem used to find the probability of guessing correctly?

Bayes' Theorem can be used to calculate the probability of guessing correctly by taking into account the prior probability of the event (e.g. the probability of guessing correctly by chance) and the new evidence (e.g. the accuracy of a test or the knowledge of the person making the guess). This allows us to make more accurate predictions and decisions.

## 5. Can Bayes' Theorem be used in real-life situations?

Yes, Bayes' Theorem can be applied to various real-life situations, such as predicting the outcome of medical tests, analyzing the effectiveness of marketing strategies, and making investment decisions. It is a powerful tool for making informed decisions based on both prior knowledge and new evidence.

• Calculus and Beyond Homework Help
Replies
6
Views
688
• Calculus and Beyond Homework Help
Replies
3
Views
799
• Precalculus Mathematics Homework Help
Replies
10
Views
1K
• Calculus and Beyond Homework Help
Replies
15
Views
2K
• Calculus and Beyond Homework Help
Replies
12
Views
2K
• Calculus and Beyond Homework Help
Replies
16
Views
1K
• Calculus and Beyond Homework Help
Replies
2
Views
2K
• Calculus and Beyond Homework Help
Replies
5
Views
386
• Calculus and Beyond Homework Help
Replies
1
Views
2K
• Calculus and Beyond Homework Help
Replies
8
Views
1K