A machine fills bags with cement. The average weight per bag is 50 kg with a standard deviation of 2 kg. If you select 100 bags at random, what is the probability that the total weight of the bags is less than 4950 kg?
from fractions import Fraction # Probabilities from Bag X prob_x_white = Fraction(5, 9) prob_x_black = Fraction(4, 9) # Probabilities from Bag Y after transfer # Case 1: White was moved (total balls in Y becomes 14, black balls remain 6) prob_y_black_given_x_white = Fraction(6, 14) # Case 2: Black was moved (total balls in Y becomes 14, black balls become 7) prob_y_black_given_x_black = Fraction(7, 14) # Total Probability final_probability = (prob_x_white * prob_y_black_given_x_white) + (prob_x_black * prob_y_black_given_x_black) print(f"The exact probability is: final_probability") # Output: 29/63 Use code with caution. probability and statistics 6 hackerrank solution
(CLT). This theorem is like a storyteller's magic trick: it says that A machine fills bags with cement
P(BY)=58126cap P open paren cap B sub cap Y close paren equals 58 over 126 end-fraction 4. Conclusion and Result By simplifying the fraction 5812658 over 126 end-fraction from fractions import Fraction # Probabilities from Bag
Hope this helps you crack Problem 6!