LoslegenKostenlos loslegen

Predicting burglary conviction rate

There are many situations that can be modeled with only two outcomes: success or failure. This exercise presents a situation that can be modeled with a binomial distribution and gives you the opportunity to calculate probabilities using binom.pmf(), binom.cdf(), and binom.sf().

The binom object from scipy.stats has been loaded for your convenience.

Imagine that in your town there are many crimes, including burglaries, but only 20% of them get solved. Last week, there were 9 burglaries. Answer the following questions.

Diese Übung ist Teil des Kurses

Foundations of Probability in Python

Kurs anzeigen

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# What is the probability of solving 4 burglaries?
four_solved = binom.____(k=____, n=____, p=____)
print(four_solved)
Code bearbeiten und ausführen