BaşlayınÜcretsiz Başlayın

Distribution of no-hitters and cycles

Now, you'll use your sampling function to compute the waiting time to observe a no-hitter and hitting of the cycle. The mean waiting time for a no-hitter is 764 games, and the mean waiting time for hitting the cycle is 715 games.

Bu egzersiz

Statistical Thinking in Python (Part 1)

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Use your successive_poisson() function to draw 100,000 out of the distribution of waiting times for observing a no-hitter and a hitting of the cycle.
  • Plot the PDF of the waiting times using the step histogram technique of a previous exercise. Don't forget the necessary keyword arguments. You should use bins=100, density=True, and histtype='step'.
  • Label the axes.
  • Show your plot.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Draw samples of waiting times: waiting_times


# Make the histogram



# Label axes



# Show the plot

Kodu Düzenle ve Çalıştır