Results 1 to 4 of 4

Math Help - Probability of having one of two unknown bags

  1. #1
    Member
    Joined
    Jan 2010
    Posts
    106
    Thanks
    2

    Probability of having one of two unknown bags

    Bag #1
    900 red eggs
    100 blue eggs

    Bag #2
    100 red eggs
    900 blue eggs

    You are given one of these two bags (50/50 chance) randomly.

    You perform a set of trials where you take out one egg randomly from your bag, note the color, then put it back in, and repeat.

    You drew 8 red eggs and 2 blue eggs from your bag during this trial. What is the probabilty (%) that you have Bag #1?



    I thought it was 50% because you could have drawn 8 red and 2 blue from bag #2 as well, since drawing eggs and putting them back does not change the bag's contents...
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor

    Joined
    Aug 2006
    Posts
    18,395
    Thanks
    1481
    Awards
    1
    Suppose that A is the event of drawing eight red and two blue eggs.
    First we must calculate P(A).
    P(A)=P(A\cap B_1)+ P(A\cap B_2)= P(A| B_1)P(B_1)+ P(A| B_2)P(B_2) .

    This problem is asking you to find P(B_1|A).
    P(B_1|A)=\frac{P(B_1\cap A)}{P(A)}.

    Can you finish?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Super Member

    Joined
    May 2006
    From
    Lexington, MA (USA)
    Posts
    11,548
    Thanks
    540
    Hello, daigo!

    \text{Bag \#1:}\;\; \begin{array}{c}\text{900 red eggs} \\ \text{100 blue eggs} \end{array} \qquad\text{Bag \#2:}\;\;\begin{array}{c}\text{ 100 red eggs} \\ \text{900 blue eggs} \end{array}<br />

    You are given one of these two bags randomly (50/50 chance).

    You perform a set of trials where you take out one egg randomly from your bag,
    note the color, then put it back in, and repeat.

    You drew 8 red eggs and 2 blue eggs from your bag during this trial.
    What is the probabilty (%) that you have Bag #1?
    This is a Conditional Probability problem:
    . . Given that 8R, 2B are drawn,
    . . what is the probability that they were drawn from Bag #1?

    Bayes' Theorem: . P\bigg(\text{Bag 1 }|\text{ 8R,2B}\bigg) \;=\;\frac{P\bigg(\text{[Bag 1] }\wedge\text{[8R,2B]}\bigg)}{P\bigg(\text{8R, 2B}\bigg)} .[1]


    Numerator: . P(\text{Bag \#1}) \,=\,\frac{1}{2}

    . . From Bag #1: . P(R) = \frac{9}{10},\;\;\;P(B) = \frac{1}{10}

    . . Then: . P(\text{8R,2B}) \:=\:{10\choose8}\left(\frac{9}{10}\right)^8\left(  \frac{1}{10}\right)^2 \;=\;(45)\,\frac{9^8}{10^{10}}

    . . Hence: . P\bigg(\text{Bag 1 }\wedge \text{ 8R,2B}\bigg) \;=\;\frac{45}{2}\cdot\frac{9^8}{10^{10}} .[2]


    Denominator: . P(\text{Bag 2}) \,=\,\frac{1}{2}

    . . From Bag #2: . P(R) =\frac{1}{10},\;\;P(B) =\frac{9}{10}

    . . Then: . P(\text{8R,2B}) \:=\:{10\choose8}\left(\frac{1}{10}\right)^8\left(  \frac{9}{10}\right)^2  \;=\;(45)\cdot \frac{9^2}{10^{10}}

    . . Hence: . P(\text{Bag 2 }\wedge\text{ 8R,2B}) \:=\: \frac{45}{2}\cdot\frac{9^2}{10^{10}} .(A)

    And we have: . P\bigg(\text{8R,2B}\bigg) \;=\;\frac{45}{2}\cdot\frac{9^8}{10^{10}} + \frac{45}{2}\cdot\frac{9^2}{10^{10}} \;=\;\frac{45}{2}\cdot\frac{9^2}{10^{10}}\cdot\lef  t(9^6 + 1\right) .[3]



    Substitute [2] and [3] into [1]:

    . . P(\text{Bag 1 }|\text{ 8R,2B}) \;=\;\frac{\dfrac{45}{2}\cdot\dfrac{9^8}{10^{10}} } {\dfrac{45}{2}\cdot\dfrac{9^2}{10^{10}}\cdot(9^6 + 1)}\;=\;\frac{9^6}{9^6 + 1}


    Therefore: . P(\text{Bag 1 }|\text{ 8R,2B}) \;=\;0.999998118


    If we draw 8 Reds and 2 Blues from a bag,
    . . the probability that they came from Bag #1 is virtually 100%.


    ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~


    The answer is reasonable when we consider (A).

    P(\text{Bag 2 }\wedge\text{ 8R,2B}) \;=\;\frac{45}{2}\cdot\frac{9^2}{10^{10}} \;=\;0.000000182


    So if we have Bag #2, it is virtually impossible to draw 8 Reds and 2 Blues.

    Follow Math Help Forum on Facebook and Google+

  4. #4
    Member
    Joined
    Jan 2010
    Posts
    106
    Thanks
    2
    Thanks. I was shown another method where I do 100 - ([1^8 * 100] / [9^8]) but I did not understand why that was the answer. Your solution clarified it better.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Balls in bags.
    Posted in the Statistics Forum
    Replies: 1
    Last Post: July 27th 2011, 06:17 PM
  2. probability of finding an unknown lowest number
    Posted in the Statistics Forum
    Replies: 3
    Last Post: July 6th 2010, 05:26 PM
  3. Marbles in Bags
    Posted in the Statistics Forum
    Replies: 1
    Last Post: January 16th 2010, 11:05 PM
  4. Ball-bags
    Posted in the Statistics Forum
    Replies: 3
    Last Post: February 9th 2009, 05:29 PM
  5. Two bags with 100 balls each, probability of sum >80
    Posted in the Advanced Statistics Forum
    Replies: 14
    Last Post: January 15th 2008, 09:41 AM

Search Tags


/mathhelpforum @mathhelpforum