This Halloween, children who trick or treat at a Yale economist’s house in New Haven, Connecticut, will be asked some questions back before they get their loot.

First, they will be randomly assigned to go to a section of Dean Karlan’s front porch — either the section with a photo of First Lady Michelle Obama, the section with a photo of 2016 Democratic presidential candidate Hillary Clinton, or the section with no photo (that’s the control). Half the kids in the Clinton and Obama areas will be asked if they know who the women are. The kids will also be asked whether they’d prefer fruit or candy.

The professor wants to see if the visual cue of Michelle Obama will lead more children to choose fruit over candy. That’s what happened when he did the experiment in 2012, and if it happens again, that may suggest the First Lady’s health campaigns have really been ingrained in kids’ heads.

Karlan isn’t the first social scientist to design an experiment around trick-or-treaters. In fact, there were a few studies published in the Journal of Personality and Social Psychology in the ’70s and ’80s, at a time when social psychologists were eager to get out of the lab and examine behavior of the broader public, says retired psychology professor Arthur Beaman. Another bonus: it was different from lab studies done with college students, where said students always know they’re part of a study, says Edward Diener, a professor of psychology at the University of Virginia and the University of Utah, who worked with Beaman on a number of papers.

The annual tradition of using kids as research subjects has seen a renewed interest of late, and the particular appeal is that these real-life examples can contribute interesting insights into human behavior. Of course, based on any one study, you wouldn’t say a theory of human nature is supported or not supported, says Bonnie Klentz, Professor of Psychology at Stonehill College in Easton, Massachusetts. But observing trick-or-treaters in their element does provide some unique benefits.

The anonymity—or self-perceived anonymity—of trick-or-treaters can make for some particularly interesting research. Scott Fraser, professor of neurophysiology teaching at the University of California-Los Angeles, realized that made them ripe for testing one of the conditions of “deindividuation theory,” the idea that behavior is dictated by context—and something like anonymity can make people less inhibited.

In the early ’70s, Fraser, Beaman and Diener designed a study involving more than 1,300 kids in the greater Seattle area on Halloween night. When the kids were told they may only take one candy, and then left them alone in the room, the kids who remained totally anonymous — meaning they weren’t asked their names — took the most candy, while the kids who were asked their names took the least.

“If you want to control behavior, you need to make people identifiable,” Fraser concludes, noting this kind of thinking explains why surveillance cameras can influence behavior. Most of these “thieves” only took an extra piece or two, but a few took many more. (Diener says jokingly: “I wonder what those kids are doing now?”)

In another experiment, kids encountered either a candy bowl with a mirror behind it or a candy bowl without a mirror. They were told they could take one treat. Researchers stood behind a sheet decorated with drawings of witches and ghosts and they spied on the children through the little peepholes. “When the mirror was present, fewer kids took extra candy,” Klentz says. “Kids who were 9 and older were more influenced by mirror than younger kids.” This suggests “it’s at a certain age when kids are able to reflect back and see themselves as an outsider would see them,” says Klentz.

Researchers have also shown that the notion of “free”—as in free Halloween candy—can lead to some irrational decision-making. Dan Ariely, professor of psychology and behavioral economics at Duke University, gave trick-or-treaters a few Hershey’s Kisses and asked them whether they would rather give him one Hershey’s Kiss to get a small Snickers bar, or two for a big Snickers. Most gave him the two for the bigger one. But when asked if they would rather have the small Snickers bar for free or the big one for one Hershey’s Kiss, most kids went for the free deal, even though it was less candy. The experiment is just an example of the “kinds of mistakes we do in the name of free,” which will make us “do irrational things, like drive a longer distance just to get gasoline” when people should really think about free as just another number, says Ariely, who describes this experiment in his 2008 book Predictably Irrational.

Indeed, much of the research on trick or treaters highlights things we already know about human behavior: “When our attention is focused on us, we tend to behave in more socially appropriate ways,” Klentz says.

Get our Health Newsletter. Sign up to receive the latest health and science news, plus answers to wellness questions and expert tips. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Olivia B. Waxman at olivia.waxman@time.com.