"The basic idea is to convert a song into a set of different data structures that are amenable for establishing a signature of a song using a quantitative approach. Think of decomposing a colour into its constituent components of red, green and blue with different weights attached.
"The probability that In My Life was written by McCartney is 0.018 - which basically means it's pretty convincingly a Lennon song. McCartney misremembers."
In My Life is ranked 23 on Rolling Stone's 500 Greatest Songs of All Time as well as fifth on its list of The Beatles' 100 Greatest Songs.
Lennon wrote the lyrics in reminiscence of his childhood years, with the original version based on a regular bus journey he took, which passed Penny Lane and the Salvation Army children's home Strawberry Field.
However, he later reworked the song to be a broader look back at his youth. McCartney claimed to have set Lennon's lyrics to music after being inspired by songs by Smokey Robinson and The Miracles. Yet up to his death, Lennon said the "middle-eight" and harmonies were his own work.
For the study researchers "decomposed" Beatles songs written between 1962 and 1966, analysing features such as frequency of chords, chord transitions, melodic notes and pitch. They found a major distinction - while the pitch of McCartney's songs were complex and varied, Lennon's did not change much at all.
Glickman said: "Consider the Lennon song Help! It basically goes, 'When I was younger, so much younger than today', where the pitch doesn't change very much. It stays at the same note repeatedly, and only changes in short steps.
"Whereas with Paul McCartney, you take a song like Michelle. In terms of pitch, it's all over the place."
However, although McCartney has lost the attribution of one song, it appears he has gained another.
The song The Word, from the same album, which is attributed to Lennon, is almost certainly by McCartney, the researchers concluded.
McCartney would not be responding to the study, a spokesman said.
The research was presented at the Joint Statistical Meetings of the American Statistical Association in Vancouver, Canada.