1. Learn
  2. /
  3. Courses
  4. /
  5. Foundations of Probability in Python

Connected

Exercise

Using binom to flip even more coins

Previously, you simulated 10 coin flips with a 35% chance of getting heads using bernoulli.rvs().

This exercise loads the binom object from scipy.stats so you can use binom.rvs() to simulate 20 trials of 10 coin flips with a 35% chance of getting heads on each coin flip.

Instructions

100 XP
  • Use the binom.rvs() function to simulate 20 trials of 10 coin flips with a 35% chance of getting heads.