Ted claimed that the book was inspired by a stranger wearing a hat who Ted sat behind on a train journey from Springfield to New York City.