Sort by

recency

|

16 Discussions

|

  • + 0 comments

    from fractions import Fraction

    a = Fraction(5, 1000) b = Fraction(8, 1000) c = Fraction(10, 1000)

    prob_a = ((a*500)/3500) prob_b = ((b*1000)/3500) prob_c = ((c*2000)/3500)

    prob = Fraction(prob_a/(prob_a + prob_b + prob_c))

    print(prob)

  • + 0 comments

    Python I multiplied every production 2 times cause in A there are 2.5 defective units, times 2 --> 5 units

    from fractions import Fraction
    
    
    A = 500*2
    pA = 0.005
    
    defA = ['defA' for _ in range(int(A*(pA)))]
    
    B = 1000*2
    pB = 0.008
    
    defB = ['defB' for _ in range(int(B*(pB)))]
    
    
    C = 2000*2
    pC = 0.010
    
    defC = ['defC' for _ in range(int(C*(pC)))]
    
    totalDef = defA + defB + defC
    
    count=0
    
    for pipe in totalDef:
        if pipe=='defA':
            count += 1
            
    print(Fraction(count, len(totalDef)))
    
  • + 0 comments

    I got a different answer. P(A|defect)=P(A and defect)/P(defect) P(A and defect) is 5/1000 P(defect)=(0.005*500+0.008*1000+0.01*2000)/3500 = 61/7000

    so P(A|defect) = 5/1000 / 61/7000 = 35/61 ??

  • + 0 comments
    a = selecting defective
    b = from plant A
    
    p(b/a)  = p(a/b) * p(b) / p(a)
    
            = ((.005) * (1/7)) / ((.005*(500/3500)) + (.008*1000/3500) + (.01*2000/3500))
    
  • + 0 comments

    hey there....i exactly know how to solve this problem... the thing i don't know is test case...it is clearly given in problem that we need to find probability of selecting defective pipe from A and for that we can directly print the results without any input... i don't know what to do apart from getting that result... could anyone over here can help me out please..