1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Data Science in Python

Connected

Exercise

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.

Instructions 1/4

undefined XP
    1
    2
    3
    4
  • Plot the letter frequencies from the ransom note. The x-values should be ransom.letter. The y-values should be ransom.frequency. The label should be the string 'Ransom'. The line should be dotted and gray.