Basic conditional probability with ball sustitution

44 Views Asked by At

i'm working on some basic conditional probability excercises (too much time not doing this math discipline), and I don't have the solution for this one. I think that is correct, but just want to confirm or to see if there is a better, or more straightforward way, to do it.

We have 3 red balls and 7 white balls on a box. The experiment is to choose two balls;but after extracting the first, it's replaced in the box by one of the other color. e.g: We choose first a red ball, we take it out, but we put a black replacement in the box.

I defined two events: A = "the first extracted ball is red" B = "the second extracted ball is red"

With this in mind, I built a tree diagram to calculate the probabilities (ensuring the second extraction probability is affected by the first):

enter image description here

Now the first question:

  • What is the probability of the second ball to be red?

In terms of our events this is calculating $P(B)$. According to total probability, we can do it as:

$P(B)=P(B|A)P(A)+P(B|A')P(A')$

$P(B)=2/10 \cdot 3/10 + 4/10 \cdot 7/10 = 17/50$

  • If both extracted balls are of the same color, what is the probability of both to be white?

I defined this as, from the events A and B, as:

$P(A \cap B)$ (both-red)

$P(A' \cap B')$ (both-white)

The asked probability can be expressed as:

$(A' \cap B' | (A \cap B) \cup (A' \cap B')) = \frac {1 - P(A \cup B)}{P(A \cap B) \cup P(A' \cap B')}$

Let's work with those terms. Since events are not independent,

$P(A \cap B) = P(A)P(B|A) = 6/100 = 3/50$

And,

$P(A' \cap B') = P[(A \cup B)'] = 1 - P(A \cup B) = 1 - (P(A)+P(B)-P(A \cap B)) = 1 - 29/50 = 21/50$

Plugging in this,

$(A' \cap B' | (A \cap B) \cup (A' \cap B')) = \frac {1 - P(A \cup B)}{P(A \cap B) \cup P(A' \cap B')} = \frac {21/50}{3/50+21/50} = 7/8$

Any help is appreciated. Thanks!