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

Connected

Exercise

Free throws example

Suppose you know that a basketball player has a 0.3 probability of scoring a free throw. What is the probability of them missing with the first throw and scoring with the second?

Instructions

100 XP
  • Import geom from scipy.stats.
  • Use the probability mass function (pmf()) with p=0.3 and specify the appropriate k value.