Sort by

recency

|

44 Discussions

|

  • + 0 comments

    I arrived at answer in a simple way:

    Say initial state of the bag is: R1 R2 R3 B1 B2 B3 B4

    Imagine first marble removed is Red(R1).

    The remaining is: R2 R3 B1 B2 B3 B4 = 6 marbles

    Now I have to pick one more marble.

    Total number outcomes = Number of permutations when I pick 1 marble from a set of 6 = P(6,1) = 6

    We just want the probability of a blue marble coming in that experiment.

    There are 4 possible favorable outcomes: B1,B2,B3,B4

    So The probability of that outcome is = 4/6

  • + 0 comments
    Solution:

    P(R) = 3/7

    P(B) = 4/7

    P(R|B) = 3/6 = 1/2

    P(R|Bc) = 2/6 = 1/3

    P(Bc) = 1-4/7 = 3/7

    P(B|R) = P(R|B) * P(B) / P(R|B) * P(B) + P(R|Bc) * P(Bc)

    P(B|R) = { (1/2) * (4/7) } / { (1/2) * (4/7) + (1/3) * (3/7) }

    P(B|R) = { (4/14) } / { (4/14) + (1/7) }

    P(B|R) = { (4/14) } / { (4/14) + (2/14) }

    P(B|R) = (4/14) / (6/14)

    P(B|R) = (4/6)

    P(B|R) = (2/3)

  • + 0 comments

    2 / 3

  • + 0 comments
    lst, lst2 = list('rrrbbbb'), list('rrbbbb')
    S1, S2 = len(lst), len(lst2)
    A = len([i for i in lst if i == 'r'])
    B = len([i for i in lst2 if i == 'b'])
    
    prob_A = A / S1
    prob_B = B / S2
    
    prob_AandB = prob_A * prob_B
    prob_BgivenA = prob_AandB / prob_A
    print(prob_BgivenA)
    
  • + 0 comments

    2/3 because there are 2 red marbles and 4 blue marbles