A demo version of the song was recorded in May 1968 at Kinfauns, George Harrison's home in Esher, and appears on Anthology 3. In that version, Mustard's sister is named Shirley. Lennon changed it to Pam when he saw the ochance to ease the segue into the song "Polythene Pam", which is after "Mean Mr. Mustard" on the album. According to Lennon, "In 'Mean Mr. Mustard', I said 'his sister Pam'—originally it was 'his sister Shirley' in the lyric. I changed it to Pam to make it sound like it had something to do with it." Additionally, the original version of the song was a quieter acoustic rendition and was over 4 minutes in length.