1. 学ぶ
  2. /
  3. コース
  4. /
  5. Foundations of Probability in Python

Connected

演習

Generating a sample

A hospital's planning department is investigating different treatments for newborns. As a data scientist you are hired to simulate the sex of 250 newborn children, and you are told that on average 50.50% are males.

指示

100 XP
  • Import the binom object from scipy.stats.
  • Generate a sample of 250 newborns with 50.50% probability of being male.
  • Print the sample.