Question: Question 2 Consider two boxes. Box A contains 7 blue and 5 red marbles, while box B contains 6 blue and 8 red marbles. A

 Question 2 Consider two boxes. Box A contains 7 blue and5 red marbles, while box B contains 6 blue and 8 red

Question 2 Consider two boxes. Box A contains 7 blue and 5 red marbles, while box B contains 6 blue and 8 red marbles. A box is selected at random, and 4 marbles are drawn from it at random. Let X = number of blue balls in the sample of 4 marbles. Part a ) Create a python function prob() with only one input variable k , and which for any & e (0, 1, 2, 3, 4 } computes the value of P(X = k). Do NOT round the output values P(X = k). In [3] : # your code here raise Not ImplementedError In [4] : """Check whether function prob is defined and has input parameter k""" assert callable(prob), "Sorry, you didn't define function prob()" assert (0 You can use np. dot ( ) for dot product of two array-like python objects. In [8] : # your code here raise Not ImplementedError In [9] : ""Check whether the answer is numeric""" assert isinstance(ans, float ) , "Sorry, wrong answer" In [10] : """Check whether the 6th and 7th decimal digits of ElX] are 9 and 5, respectively""" assert np. mod( int (np . floor (ans * 10*+7) ), 100) == 95 , "Sorry, wrong answer" In [11] : """Check whether the answer is correct (hidden test)""" Out [11] : 'Check whether the answer is correct (hidden test )' In [ ]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!