"It is a capital mistake to theorise before one has data. Insensibly one begins to twist facts to suit theories, instead of theories to suit facts." In this episode Sherlock expresses his opinion on detection to Morland Holmes using almost these exact words from "A Scandal in Bohemia," a story in which the central character is Irene Adler.
The title of this episode is contained in the lyrics of the disco song Sherlock plays part way through the show: "Turn the Beat Around" sung by Vicki Sue Robinson released in 1976. While there were a few other successful cover versions of the song released over the years, it is Ms. Robinson's version heard here.