What is the Probability of Selecting a White Ball from Two Boxes?

  • Context: MHB 
  • Thread starter Thread starter mathmari
  • Start date Start date
  • Tags Tags
    Probabilities
Click For Summary
SUMMARY

The discussion centers on calculating the probability of selecting a white ball from two boxes: a blue box containing one black and three white balls, and a red box with two black and four white balls. Participants clarify that the probability of choosing either box is equal (P(B) = P(R) = 0.5) and explore the use of Bayes' theorem for conditional probabilities. They conclude that while P(w|R) can be directly calculated, P(R|w) requires Bayes' theorem due to the dependency on prior knowledge of the box chosen.

PREREQUISITES
  • Understanding of conditional probability
  • Familiarity with Bayes' theorem
  • Basic knowledge of probability theory
  • Ability to interpret probability notation and calculations
NEXT STEPS
  • Study the application of Bayes' theorem in real-world scenarios
  • Learn about conditional probability and its implications in statistics
  • Explore examples of probability calculations involving multiple events
  • Review the concept of independence in probability theory
USEFUL FOR

Students of statistics, data scientists, and anyone interested in understanding probability theory and its applications in decision-making processes.

mathmari
Gold Member
MHB
Messages
4,984
Reaction score
7
Hey! :o

I am looking at the following:

We have two boxes. In the blue box there are one black and three white balls. In the red box there are two black and four white balls. We choose one of the boxes and then we pick a ball from that box.

So we have that $\Omega=\{B,R\}\times \{b,w\}$, where B:blue, R:red, b:black, w:white.

We have that $P(B)=P(R)=0,5$ since we have two boxes and the probability to take one of them is equivalent, right? (Wondering)

To calculate the probabilities $P(w\mid B), P(b\mid B), P(w\mid R), P(b\mid R)$ do we use the Bayes’ theorem?

$$P(w\mid B)=\frac{P(w\cap B)}{P(B)}$$ Are the events w and B independent? If yes, we get the following: $$P(w\mid B)=\frac{P(w)\cdot P( B)}{P(B)}=P(w)$$ Is that correct (Wondering) But in that way we don't take into consideration from which box we take the ball, do we? (Wondering)
 
Physics news on Phys.org
Hey mathmari! (Smile)

mathmari said:
Hey! :o

I am looking at the following:

We have two boxes. In the blue box there are one black and three white balls. In the red box there are two black and four white balls. We choose one of the boxes and then we pick a ball from that box.

So we have that $\Omega=\{B,R\}\times \{b,w\}$, where B:blue, R:red, b:black, w:white.

We have that $P(B)=P(R)=0,5$ since we have two boxes and the probability to take one of them is equivalent, right? (Wondering)

It doesn't say that we randomly pick a box does it? So I don't think we can assume that.
Perhaps we don't need it. (Thinking)

mathmari said:
To calculate the probabilities $P(w\mid B), P(b\mid B), P(w\mid R), P(b\mid R)$ do we use the Bayes’ theorem?
$$P(w\mid B)=\frac{P(w\cap B)}{P(B)}$$

I'm afraid that that's not Bayes' theorem. Instead it's the definition of a conditional probability.

For reference Bayes' theorem is:
$$P(A\mid B) = \frac{P(B \mid A) \, P(A)}{P(B)}$$
It converts a conditional probability into an inverted conditional probability

mathmari said:
Are the events w and B independent? If yes, we get the following: $$P(w\mid B)=\frac{P(w)\cdot P( B)}{P(B)}=P(w)$$ Is that correct (Wondering) But in that way we don't take into consideration from which box we take the ball, do we? (Wondering)

We can already see that those events won't be independent.
If we pick box B, the chance that we pick a white ball is different from when we'd pick box R.

Let's take a look at what $P(w\mid B)$ actually means.
It is the probability that we draw a white ball given that we have picked box B.
What is the probability to draw a white ball if we assume we only have one box, which is box B? (Wondering)
 
I like Serena said:
It doesn't say that we randomly pick a box does it? So I don't think we can assume that.
Perhaps we don't need it. (Thinking)
I read it again. It is mentionned that we randomly pick a box.
I like Serena said:
I'm afraid that that's not Bayes' theorem. Instead it's the definition of a conditional probability.

For reference Bayes' theorem is:
$$P(A\mid B) = \frac{P(B \mid A) \, P(A)}{P(B)}$$
It converts a conditional probability into an inverted conditional probability
We can already see that those events won't be independent.
If we pick box B, the chance that we pick a white ball is different from when we'd pick box R.

Let's take a look at what $P(w\mid B)$ actually means.
It is the probability that we draw a white ball given that we have picked box B.
What is the probability to draw a white ball if we assume we only have one box, which is box B? (Wondering)
Do we have to divide the number of white balls in B by the total number of balls in B? (Wondering)

So we don't have to use the conditional probability? (Wondering)
 
mathmari said:
I read it again. It is mentionned that we randomly pick a box.

Doesn't it say that we 'choose' a box?
That doesn"t sound like selecting randomly and aselectively. (Wondering)

mathmari said:
Do we have to divide the number of white balls in B by the total number of balls in B? (Wondering)

So we don't have to use the conditional probability? (Wondering)

Yep. (Nod)
 
I like Serena said:
Doesn't it say that we 'choose' a box?
That doesn"t sound like selecting randomly and aselectively. (Wondering)
It says that "We randomly choose one of the two boxes and then we pick a ball from that box." Is the probability that we pick a black ball equal to the sum of $P(b\mid B)$ and $P(b\mid R)$ ? (Wondering)

We assume that a ball is white. Is the probability that this ball is from the red box equal to $P(w\mid R)$ ? (Wondering)
 
mathmari said:
It says that "We randomly choose one of the two boxes and then we pick a ball from that box."

Ah okay. That was missing from post #1 then.

mathmari said:
Is the probability that we pick a black ball equal to the sum of $P(b\mid B)$ and $P(b\mid R)$ ? (Wondering)

Let's see... suppose there were 99 black balls out of a 100 in both B and R.
Then:
$$P(b\mid B) + P(b\mid R) = \frac{99}{100} + \frac{99}{100} = \frac{198}{100}$$
A probability cannot be greater than $1$ can it? (Wondering)

Which calculation rules for probabilities do you know?
Can we apply them?

mathmari said:
We assume that a ball is white. Is the probability that this ball is from the red box equal to $P(w\mid R)$ ? (Wondering)

$P(w\mid R)$ is the probability that a ball is white, given that it's coming from R.
That doesn't sound like the same thing does it? (Wondering)
 
I like Serena said:
Let's see... suppose there were 99 black balls out of a 100 in both B and R.
Then:
$$P(b\mid B) + P(b\mid R) = \frac{99}{100} + \frac{99}{100} = \frac{198}{100}$$
A probability cannot be greater than $1$ can it? (Wondering)

Which calculation rules for probabilities do you know?
Can we apply them?

Could you give me a hint? I got stuck right now... (Thinking)

I like Serena said:
$P(w\mid R)$ is the probability that a ball is white, given that it's coming from R.
That doesn't sound like the same thing does it? (Wondering)
Do we maybe have to calculate the probability $P(R\mid w)$ ? This is the probability that, given that we have chosen a white ball, it is from the red box, or not? (Wondering)
 
mathmari said:
Could you give me a hint? I got stuck right now... (Thinking)

Of course.
We have:
$$P(b) = P((b\land R)\lor(b\land B))$$
That is, either we pick a black ball from the red box, or we pick a black ball from the blue box.
Since picking from either R or B is mutually exclusive, we can use the sum rule to conclude that:
$$ P((b\land R)\lor(b\land B))=P(b\land R)+P(b\land B)$$
And from the definition of the conditional probability it follows (by the general product rule) that:
$$P(b\land R)+P(b\land B)=P(b\mid R)P(R) + P(b\mid B)P(B)$$
Can we find the probability now? (Wondering)

mathmari said:
Do we maybe have to calculate the probability $P(R\mid w)$ ? This is the probability that, given that we have chosen a white ball, it is from the red box, or not? (Wondering)

Yes. This is where Bayes' theorem would come in. (Thinking)
 
I like Serena said:
Of course.
We have:
$$P(b) = P((b\land R)\lor(b\land B))$$
That is, either we pick a black ball from the red box, or we pick a black ball from the blue box.
Since picking from either R or B is mutually exclusive, we can use the sum rule to conclude that:
$$ P((b\land R)\lor(b\land B))=P(b\land R)+P(b\land B)$$
And from the definition of the conditional probability it follows (by the general product rule) that:
$$P(b\land R)+P(b\land B)=P(b\mid R)P(R) + P(b\mid B)P(B)$$
Can we find the probability now? (Wondering)
Ah I see!

So we have the following: $$P(b)=P(b\mid R)P(R) + P(b\mid B)P(B)=\frac{1}{3}\cdot 0,5 + \frac{1}{4}\cdot 0,5=\frac{1}{6}+\frac{1}{8}=\frac{14}{48}=\frac{7}{24}$$ right? (Wondering)
I like Serena said:
Yes. This is where Bayes' theorem would come in. (Thinking)

Ah ok! So, we have the following: $$P(R\mid w)=\frac{P(R\cap w)}{P(w)}=\frac{P(w\mid R)\cdot P(R)}{P(w)}=\frac{\frac{2}{3}\cdot 0,5}{P(w)}=\frac{\frac{2}{6}}{P(w)}=\frac{1}{3\cdot P(w)}$$ where $$P(w)=P((w\land R)\lor(w\land B))=P(w\land R)+P(w\land B)=P(w\mid R)P(R) + P(w\mid B)P(B)=\frac{2}{3}\cdot 0,5 + \frac{3}{4}\cdot 0,5=\frac{2}{6} + \frac{3}{8}=\frac{17}{24}$$
Therefore, we get $$P(R\mid w)=\frac{1}{3\cdot \frac{17}{24}}=\frac{1}{\frac{17}{8}}=\frac{8}{17}$$
Is everything correct? (Wondering) Why do we use the Bayes' theorem to calculate $P(R\mid w)$ but not for $P(w\mid R)$ ? (Wondering)
 
  • #10
mathmari said:
Ah I see!

So we have the following: $$P(b)=P(b\mid R)P(R) + P(b\mid B)P(B)=\frac{1}{3}\cdot 0,5 + \frac{1}{4}\cdot 0,5=\frac{1}{6}+\frac{1}{8}=\frac{14}{48}=\frac{7}{24}$$ right? (Wondering)

Ah ok! So, we have the following: $$P(R\mid w)=\frac{P(R\cap w)}{P(w)}=\frac{P(w\mid R)\cdot P(R)}{P(w)}=\frac{\frac{2}{3}\cdot 0,5}{P(w)}=\frac{\frac{2}{6}}{P(w)}=\frac{1}{3\cdot P(w)}$$ where $$P(w)=P((w\land R)\lor(w\land B))=P(w\land R)+P(w\land B)=P(w\mid R)P(R) + P(w\mid B)P(B)=\frac{2}{3}\cdot 0,5 + \frac{3}{4}\cdot 0,5=\frac{2}{6} + \frac{3}{8}=\frac{17}{24}$$
Therefore, we get $$P(R\mid w)=\frac{1}{3\cdot \frac{17}{24}}=\frac{1}{\frac{17}{8}}=\frac{8}{17}$$
Is everything correct? (Wondering)

That looks all correct to me. (Happy)

mathmari said:
Why do we use the Bayes' theorem to calculate $P(R\mid w)$ but not for $P(w\mid R)$ ? (Wondering)

Because we can tell what $P(w\mid R)$ is, knowing that we pick a random ball from R.
But we don't know what $P(R\mid w)$ is, other than using Bayes' theorem? (Thinking)
 
  • #11
I like Serena said:
That looks all correct to me. (Happy)
Because we can tell what $P(w\mid R)$ is, knowing that we pick a random ball from R.
But we don't know what $P(R\mid w)$ is, other than using Bayes' theorem? (Thinking)
Ah ok! Thank you so much! (Smile)
 

Similar threads

  • · Replies 29 ·
Replies
29
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 36 ·
2
Replies
36
Views
5K
  • · Replies 7 ·
Replies
7
Views
832
  • · Replies 1 ·
Replies
1
Views
2K
Replies
10
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K