Question: A simulation that involves drawing two marbles out of a bag has already been done and the data from the simulation is provided for you
A simulation that involves drawing two marbles out of a bag has already been done and the data from the simulation is provided for you in a file called marblessimulation.csv The simulation was drawing from a bag that had red marbles, blue marbles, and white marbles. The results of the simulation are stored in DataFrame with columns draw and draw
The values in the columns draw and draw are integers that represent a color. Specifically:
represents red,
represents blue, and
represents white
The results of this simulation are provided to you in a DataFrame named df Using df write the Python code to calculate the estimated probability of drawing exactly one red marble and one white marble and store that probability in a variable named prob. Make sure to return your variable at the end.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
