Maximizing the probability of choosing a green ball from two boxes

165 Views Asked by At

I have this excercise from a book of bayesian Analysis

Consider two boxes A and B each of which contains both red balls and green balls. It is known that, in one of the boxes, $\frac{1}{2}$ of the balls are red and $\frac{1}{2}$ are green and that in the other box, $\frac{1}{4}$ of the balls are red and $\frac{3}{4}$ are green.

Let the box in which $\frac{1}{2}$ are red to be denoted box W and suppose:

P(W=A)=ξ

P(W=B)=1−ξ

Suppose that the statistician may select one ball at random from either box A or box B and that, after observing its color, he must decide whether W=A or W=B

Prove that if $\frac{1}{2}$<ξ<$\frac{2}{3}$, then in order to maximize the probability of making a correct decision, he should select the ball from box B.

Prove also that if $\frac{2}{3}$<ξ<1, then it does not matter from which box the ball is selected.

My attempt to solve the excercise is the next:

Using the bayesian analysis

$\pi(\theta|x)= \frac{P(x | \theta) \cdot \pi (\theta)}{P(x)}$

We have 4 cases:

A) When we select a ball from A

  1. Select 1 Ball from the box A and is Red

    P(W=A|Red from A) = $\frac{2ξ}{ξ+1}$

    P(W=B|Red from A) = $\frac{1-ξ}{1+ξ}$

  2. Select 1 Ball from the box A and is Green

    P(W=A|Green from A) = $\frac{2ξ}{3-ξ}$

    P(W=B|Green from A) = $\frac{3(1-ξ)}{3-ξ}$

B) When we select a ball from B

  1. Select 1 Ball from the box B and is Red

    P(W=B|Red from B) = $\frac{2-2ξ}{2-ξ}$

    P(W=A|Red from B) = $\frac{ξ}{2-ξ}$

  2. Select 1 Ball from the box B and is Green

    P(W=B|Green from B) = $\frac{2-2ξ}{2+ξ}$

    P(W=A|Green from B) = $\frac{3ξ}{2+ξ}$

I have this but I´m Stuck in the part of optimize the probability

Thanks in andvance.

1

There are 1 best solutions below

1
On

If we choose to draw from $A$ and get red, we should say $W = A$ iff $P(W = A | \text{red from A}) > P(W = B | \text{red from A})$. If it's so, then $P(\text{red from A} \wedge \text{we are right}) = P(\text{red from A} \wedge W = A)$, otherwise $P(\text{red from A} \wedge \text{we are right}) = P(\text{red from A} \wedge W = B)$. And if we choose to draw ball from $A$, total probability of us guessing right is $P(\text{red from A} \wedge \text{we are right}) + P(\text{green from A} \wedge \text{we are right})$.

From your probabilities, if we draw ball from $A$, we should always (if $\xi \geq \frac{1}{2})$) say $W = A$ if we draw red, and if we draw green we should still say $W = A$ if $\xi > \frac{3}{5}$.

So, if $\xi < \frac{3}{5}$, we get answer correct with probability $\xi \cdot \frac{1}{2} + (1 - \xi) \cdot \frac{3}{4}$. If $\xi > \frac{3}{5}$, we just always say $W = A$, and we will be right with probability $\xi$.

We can find similar probabilities for drawing ball from $B$ and compare probabilities of success depending on $\xi$.