British psychologists have shed light on one of the most enduring mysteries of human courtship: why men persist with chat-up lines that send most women running for the hills.

A survey of people's reactions to chat-up lines revealed that while women were more likely to favour lines suggesting that a man was a nice guy, or at least fun to be with, men were consistently over-optimistic that women would find them irresistible if their opening gambit was sexually explicit.

The Edinburgh University-based team compiled a list of 40 chat-up scenarios from books, websites and films and asked groups of male and female students to vote on how the woman in each situation was most likely to react.

The chat-up lines used by the men fell into four categories, depending on the impression the man was trying to give of himself.

They ranged from attempts to appear cultured ("It's at moments like these when I am reminded of Byron"); to the meaningless compliment ("Did it hurt when you fell from heaven?"); the sexual reference ("I may not be Fred Flintstone, but I bet I can make your bed rock"), to the humorous ("Hi, how do you like me so far").

During the survey, 266 women and 115 men rated the chat-up scenarios from one to five, with one indicating that the woman was likely to stop the conversation immediately.

Unsurprisingly, the study found that women rated chat-up lines depending on their personalities, with extroverted women preferring more humorous approaches and tough-minded women finding "nice guy" chat-up lines a turn-off.

"The interesting difference appeared when we compared the sexes," said Peter Caryl, a psychologist on the study, which appears in the journal Personality and Individual Differences. "Despite being deeply unpopular with women, men are unreasonably optimistic about how well their sexually explicit lines will go down," he said.

The researchers believe it is possible that men use chat-up lines to do more than attract women, choosing their lines so they appeal to personality types they are interested in.

"While the woman's attractiveness will be known in a face-to-face encounter, the man may need to make a rapid assessment of her personality, and he could potentially achieve this through his opening remark," the authors wrote.

The study suggested that men's chat-up lines helped to pigeon-hole them into one of four categories: the friendly and considerate "nice guy"; the industrious and enterprising "provider"; the confident and strong "leader", and the fickle and conceited "bad mate".

"I can't imagine anyone being turned on by this "bad mate" kind of guy, but some women seem to be less put off than others. If you look like George Clooney, you may be able to get away with a whole range of things," Dr Caryl said.