In a series of recent studies, Dan Ariely of Duke University and his colleagues gave college students opportunities to cheat on a general knowledge test. In one, students were instructed to transfer their answers onto a form with color-in bubbles, to register their official score. Some received bubble sheets with the correct answers seemingly inadvertently shaded in gray, and changed about 20 percent of their answers. A follow-up study demonstrated that they were unaware of the magnitude of their dishonesty. They were cheating without being fully aware of it.

Yet the behavior changes once a clear rule is in place. “If you specifically tell people in these studies not to use the answer key and just sign their name,” said Zoe Chance, a doctoral student at Harvard who worked on some of the experiments, “they won’t look at it.”

David DeSteno, a psychologist at Northeastern University in Boston and co-author of the coming book “Out of Character,” about deception and other misbehavior, said: “With all of these kinds of decisions there’s a battle between short- and long-term gains, a tension between the more virtuous choice and the less virtuous one. And of course there are outside factors that can sway that arrow to one side or another.”

That is, low-level cheating may be natural and even productive in some situations; the brain naturally seeks useful shortcuts. But most people tend to follow rules they accept as fair, even when they have the opportunity and a strong incentive to break them.