Using Python :
consider the following experiment:
You roll a pair of fair dice and calculate the sum of the faces.
You are interested in the number of rolls it takes until you get a sum of "7". The first time you get a "7" the experiment is considered a "success". You record the number of rolls and you stop the experiment. You repeat the experiment N=100,000 times. Each time you keep track of the number of rolls it takes to have "success".
After the N experiments are completed you should generate a probability mass function for the number of rolls it takes for "success".
Get Answers For Free
Most questions answered within 1 hours.