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

Identifying Bayes' kidnapper

We've narrowed the possible kidnappers down to two suspects:

  • Fred Frequentist (suspect1)
  • Gertrude Cox (suspect2)

The kidnapper left a long ransom note containing several unusual phrases. Help DataCamp by using a line plot to compare the frequency of letters in the ransom note to samples from the two main suspects.

Three DataFrames have been loaded:

  • ransom contains the letter frequencies for the ransom note.
  • suspect1 contains the letter frequencies for the sample from Fred Frequentist.
  • suspect2 contains the letter frequencies for the sample from Gertrude Cox.

Each DataFrame contain two columns letter and frequency.

Bu egzersiz

Introduction to Data Science in Python

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

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# x should be ransom.letter and y should be ransom.frequency
plt.plot(____.____, ____.____,
         # Label should be "Ransom"
         ____="Ransom",
         # Plot the ransom letter as a dotted gray line
         ____=':', ____='gray')

# Display the plot
plt.show()
Kodu Düzenle ve Çalıştır