For anyone trying to eat better: New research shows the simple act of having to serve yourself can curb unhealthy indulgence. People who choose their own piece of cake—or, even better, cut it themselves—eat less of it. They’re also less likely to eat things like cake at all.

Having to serve yourself doesn’t curb appetites for healthy foods, the study found. It only stopped people from eating unhealthy food.

“If they’re served by someone else, they can outsource responsibility to someone else,” says Dr. Linda Hagen, assistant professor of marketing at the University of Southern California’s Marshall School of Business. “But if they serve themselves, they have to accept responsibility and that makes them feel bad.”

Those are the findings of five experiments with a total of nearly 800 participants by Dr. Hagen and two co-authors, to be published later this year in the Journal of Marketing Research. The experiments found that the less involved people are in serving unhealthy foods, the more likely they are to eat them—and to eat larger portions.

One experiment, conducted in a waiting room at the University of Michigan’s Ross School of Business, centered on food set out for 189 students waiting to be called into an unrelated management study. The students arrived in several separate groups and were greeted by a sign: “Have yourself a little snack.”

Researchers tested various scenarios with two snacks: dried fruit, which students rated as relatively healthy, and Reese’s Pieces, which they rated as unhealthy.

When portions of the Reese’s Pieces were placed into sampling cups, nearly 32% of students took one. But when a big bowl of the candy was set out with a spoon and a stack of cups, none of the 46 students served themselves the snack.

The dried fruit spurred different behavior. A similar number of students took the fruit when they had to scoop it (6.4 percent) as when it was already placed into cups (16.3 percent). The difference wasn't significant—people didn’t eat more or less healthy food depending on how they got it.

Click for more from The Wall Street Journal.