I do not understand this code, is it correct?
# simulate 1 million tests of five fair coin flips tests =np.random.binomial(5, 0.5, int(1e6)) # proportion of tests that produced 1 head (tests == 1).mean() print(tests) why is the first argument of binomial = 5 if the outcomes are only 2 (heads=1, tails=0)? Next, the size param should IMO be a 2d array to take into account the 5 flips per test. I see in the numpy docs that this option is available, but I did not find any example using size=array. Thanks for any further insight.