Answered step by step
Verified Expert Solution
Question
1 Approved Answer
programing language Python Coin Flipping Simulation with Statistics If you generate a pseudo-random number that can take on two values (0 and 1 would be
programing language Python
Coin Flipping Simulation with Statistics If you generate a pseudo-random number that can take on two values (0 and 1 would be a natural in computer science), then you are simulating the flipping of a coin. Write a function that flips five coins repeatedly until the coins have the same face (all heads or all tails) and return the number of flips required. (You can but do not have to make the five a parameter of the function.) Set a sample size (say 100) and call your function that many times and use that to generate a list of results. Send that list to a function that generates a dictionary of statistics for the list data. The statistics should include: average, standard deviation, minimum, maximum, and medianStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started