The study came about in an unlikely way. Finance professors at the University of Texas at Austin and Emory University were able to examine customers of Ashley Madison, a dating site for married people looking to have affairs, or “discreet encounters” as it puts it. That’s because a computer hack in 2015 exposed the names and personal data of more than 30 million users.

Researchers examined four groups of users specifically — a total of 11,000 brokers, corporate executives, white-collar criminals and police officers. Cross-checking against public records, they found that those Ashley Madison customers generally were more than twice as likely to have violated professional codes of conduct compared with a control group, according to authors John Griffin, Samuel Kruger and Gonzalo Maturana.

“Our study indicates cheating in one context carries over to cheating in others,” said Griffin, who has a specialty investigating Wall Street misconduct. “We’re not trying to debate ethics or lecture people. All we’re doing is examining the data and the data is fairly strong.”