Aan de slagGa gratis aan de slag

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?

Deze oefening maakt deel uit van de cursus

Foundations of Probability in Python

Cursus bekijken

Oefeninstructies

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

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Import geom from scipy.stats
from ____

# Probability of missing first and scoring on second throw
probability = ____.____(k=____, p=____)

# Print the result
print(probability)
Code bewerken en uitvoeren