Probability Calculator: Experiment --> Expect 3 balls, draw 4 ?!

Hello! I am struggling on understand the task as mentioned in the headline. How to expect 3 balls when i draw 4?
Code for the testunit:

    def test_prob_experiment(self):
        probability = prob_calculator.experiment(hat=hat, expected_balls={"blue":2,"green":1}, num_balls_drawn=4, num_experiments=1000)

Drawing 4 balls will never lead to “blue”: 2, “green”:1.
I cant see tho logic.

Please provide a link to the challenge and in case you got some kind of error, also your code.

Because now I just have to guess: Read the description again, in this simulation the ball might be returned to the urn after drawing it.

I updated my question.
Thanks for your reply.

Hm… well had to look up my solution and it didn’t run into any problem with that.

I think in this instance the expected_balls only represent part of all drawn balls - meaning it expects to draw those 3, while the fourth one can be whatever.
It’s like throwing a dice 10 times and looking for the chance to get (at least) three times a 6. It doesn’t matter what the other 7 results are.

1 Like

please provide the actual ‘challenge’ to understand the problem.

Believe it or not, I was in my bathroom yesterday and thought about this solution (never mind the 4th ball).
But I smiled and discarded that idea.
I will try.
Thank you :slight_smile: