The stock market volatility after last week's Bexit vote underscores the influence and unpredictable nature of market psychology.

The immediate aftermath was a vicious slide that resulted in the worst losses over two trading sessions in about a year. Many market observers noted that Wall Street's reaction wasn't logical given that outcome of Britain's referendum has little direct economic consequences for U.S. companies.

However, markets went into a tailspin because experts had predicted that the U.K. would remain in the EU as they were urged to do by Prime Minister David Cameron and numerous business leaders in Britain.

Get Breaking News Delivered to Your Inbox

Several psychological issues are at play here.

First, experts in the behavioral psychology of investors say most tend to overreact to good news by bidding stocks higher and to bad news by sending them lower.

Then there's "inertia," the belief that what goes down will continue going down and what goes up will keep rising. Investors also cope with "loss inversion," in which they think the pain of losing money is greater than the pleasure they get from earning it.

"They will operate by limiting their losses even though market professionals tell them to stay the course and see it through," said Dr. Jeffrey Nevid, a professor of psychology at St. John's University. "They also feel a sense of powerlessness and feel they have to take action even though the action may be self-defeating."

Although financial advisers often will advise their clients to make investing decisions as dispassionately as possible, many people have difficulty following that advice. Nevid noted that some people start to think of stocks as living, breathing things and make disastrous investing decisions as a result.

"They somehow think by selling the stock at a low is punishing the stock," he said.

Investors also fall victim to a psychological phenomenon called "representativeness," in which they draw erroneous conclusions based on a small amount of data, said Victor Ricciardi, an assistant professor at Goucher College in Baltimore. That could prove problematic in a situation like the Brexit vote, which has never happened before.

Despite the constant urging of financial professionals for investors to maintain a certain portion of their portfolios in stocks, people often panic when markets turn volatile, and they liquidate their positions. Then they're faced with the challenge of figuring out what to do next and when to return to the market.

"They're not even financially educated enough to look at something like gold," Ricciardi said.

Indeed, the turmoil resulting from Brexit won't go away anytime soon. Media reports indicate that many people in the U.K. didn't understand the consequences of their vote. A petition drive for a do-over of the referendum has reportedly attracted more than 3 million signatures, though its chances remain remote.

The Brexit vote shows how investor psychology -- especially fear of the unknown -- can be self-defeating. And after all, it's not like the unknown is ever going to go away.