One of the last remaining Beatles mysteries has finally been solved. For decades, no one knew for certain which Beatle wrote the 1965 song “In My Life”—Paul McCartney claimed to have written the music, but John Lennon said that McCartney only wrote part of it.

Now, academics have used a statistical method to get to the bottom of the song’s origin, and the numbers show that neither musician remembered it correctly, as NPR reports. According to a paper recently presented at a major statistics conference, Lennon wrote the entire song himself.

Lennon and McCartney shared a joint credit for all of the songs they wrote, regardless of the division of work. This reportedly stems back to an agreement they made as teenagers. Jason Brown, a mathematics professor at Canada's Dalhousie University, spent at least 10 years trying to crack the puzzle of who actually wrote “In My Life.”

Even though the two artists undoubtedly rubbed off on each other artistically during their years together, the two musicians still had their preferences, which can be charted and quantified. Brown and his co-authors—a mathematician and an engineering professor—analyzed individual notes, chords, and other components in dozens of Beatles songs to determine how often they appear in the Lennon-McCartney song catalog, identifying 149 distinct musical transitions in the Beatles oeuvre. Those stylistic choices are unique to the individual songwriter.

“When you do the math by counting the little bits that are unique to the people, the probability that McCartney wrote ["In My Life"] was .018—that's essentially zero,” Stanford mathematician Keith Devlin, who was not involved in the study, explained to NPR. “In other words, this is pretty well definitive. Lennon wrote the music.”

While some might be skeptical of reducing a creative process to numbers, Devlin said this method is “much more reliable than people’s recollections,” especially given the “incredibly altered mental state” that The Beatles found themselves in throughout much of the ’60s. And this isn't the first analysis of its kind. Another study in 2014 [PDF] determined that lyrics and algorithms could also be used to determine whether a song was written by McCartney or Lennon.

This wasn't Brown's first investigation into The Beatles' songwriting process, either. Back in 2008, he used sound-wave analysis to figure out how The Beatles created the opening chord of “A Hard Day’s Night,” hypothesizing that it was a combination of guitar, bass, and piano.

Lennon once said in an interview that he was inspired to write “In My Life” after a journalist suggested he model more songs after his own life experiences. Lennon later said that he considered the song to be his first major, meaningful piece of work, adding that, “Up until then, it had all been glib and throwaway.”

[h/t NPR]