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?
Diese Übung ist Teil des Kurses
Foundations of Probability in Python
Anleitung zur Übung
- Import
geom
fromscipy.stats
. - Use the probability mass function (
pmf()
) withp=0.3
and specify the appropriatek
value.
Interaktive Übung
Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.
# Import geom from scipy.stats
from ____
# Probability of missing first and scoring on second throw
probability = ____.____(k=____, p=____)
# Print the result
print(probability)