Professor Smith then showed his subjects an epilogue that revealed that neither student was going to medical school after all; they had both been arrested for stealing methamphetamines from a school lab. A second questionnaire measured how his subjects felt about the news. The fall of the wealthy, good-looking medical-school applicant inspired more glee than the fall of the other.

Envy, Professor Smith said the test showed, was a ''potent predictor of schadenfreude.''

An Australian researcher, Norman Feather of Flinders University in Adelaide, takes a different view. He says the key is not envy, but resentment. He presented subjects with written descriptions of three imaginary students, one with average grades, one who made A's by studying and another who made A's despite slacking off.

Professor Feather said he found that both A students were envied, but that the A student who didn't have to study was resented as well. He then showed his subjects an epilogue that revealed all three students had done poorly on a test.

''We found that the more students were seen not to deserve their status, people were much happier about their fall from grace,'' Professor Feather said. He likened his laboratory test to the public reaction to the current corporate scandals. Disgraced executives at a company like Enron, he said, would be like that A student who didn't study. ''If there were shoddy practices, then you resent them,'' he said. ''You don't think they're deserving, and you feel schadenfreude.''

Professor Feather and other psychologists base their work on what is known as Social Comparison Theory. The field was conceived in the 1950's by a psychologist named Leon Festinger and is based on a rather simple premise: that humans evaluate themselves not so much by objective standards as by comparison with people around them. An old psychology-conference joke illustrates the point. Two men are walking in the woods when they come across a bear. The first man reaches into his knapsack and pulls out a pair of sneakers. ''Why are you putting on sneakers?'' the second man asks. ''You can't outrun a bear.''

''I don't have to outrun the bear,'' the first answers, ''I just have to outrun you.''

''Many people don't appreciate that when they come to conclusions about their own abilities -- whether they're a fast runner or not, whether they're smart or not, whether their opinions are the right opinions or not -- they use social comparisons as a basis for that judgment,'' Professor Smith said. ''They look around.''