Question: Need help writing a one line code NumPy using np.random.multinomial. Need to sample ten independent simulations of which drawing 80 times randomly from a random
Need help writing a one line code NumPy using np.random.multinomial. Need to sample ten independent simulations of which drawing 80 times randomly from a random population in which 35 percent are Asian. Assume there is replacement.
Hint:Your output is an array containing the counts of the asian category in our n simulations. NumPy array slicing is needed.
I did s = np.random.multinomial(2,[0.35], size = 10) but I end up with an array of ten with the same number

Im not sure what I did wrong n is the number of possible outcomes, I put 2 because the question says if youre asian and the only other outcome is not asian.
Out[17]: array([[2], [2], [2], [2] [2], [2], [2], [2], [2], [2]])
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
