Lyric discussion by tomauto 

"His sister Pam" was added in(I think John's original lyric had her name as Shirley or something) to fit with the medley concept. So yeah, Mr. Mustard and Polythene Pam are siblings

actually just heard it on the anthology and it's "shelly"

originally the last track, "her majesty" which is just a little tiny sound bit, was supposed to go between "Mr. Mustard" and "Polythene Pam". But I think the label decided to cut it for continuity so McCartney just tagged it on the end of Abbey Road. If you can program your CD player, you'll see how it fits between the two!

@tomauto Yes, they are related (although Pam is transgender, which accounts for John mentioning that 'she looks like a man')

An error occured.