When Queen Elizabeth II spotted Simon Farnaby arriving for filming over the Jubilee weekend she said 'Ah, I see he's wearing trousers.' A reference to Farnaby's character in "Ghosts" who always appears without pants, thus proving that Queen Elizabeth II was a fan of the show.
"Julian", Simon Farnaby's character, was influenced by a number of different politicians including Tony Blair, David Cameron, and Boris Johnson. The nature of his death was likely based upon that of the former conservative MP Stephen Milligan, who died of autoerotic asphyxiation in 1994.
West Horsley Place, where the show was filmed, has an interesting history that has influenced the show in multiple ways. For example, Guy Fawkes used to be a footman there, which inspired the story line for Humphrey Bone's Plot. Or that King Henry 8th dined there, which comes back as 'Button House' trivia in series 5. Even the Coopers inheriting the house was based on the real life owner of West Horsley Place, who inherited the house from a distant relative, with the house in a less than stellar state of repair.
The show's "doll house" title sequence creates the ghostly images by reflecting them off sheets of glass in front or inside of the miniature set pieces (an unintended reflection in the glass can be seen when Pat the scout leader appears). Invented by stage magicians in the 19th century, this technique is known as "pepper's ghost".
Early concepts for the character of "Julian Fawcett MP" (the trouser-less ghost) were far more risque, and according to producer Simon Farnaby, it came to a point of almost not being appropriate for prime time television, as they included leather straps, a BDSM mask and a gag-ball.