The marshmallow test is a famous psychological experiment intended to measure children's self control. A researcher places a tasty treat — often a marshmallow — before a child, and gives her a choice: She can eat the marshmallow now, or she can wait a set period of time and eat two marshmallows instead.

The test is a measure of a child's ability to delay gratification, which subsequent research has shown to be linked to all sorts of positive outcomes, like better grades, good behavior and even healthy body mass index.

Researchers have been administering the test to groups of kids for over 50 years now, which leads to a natural question: Have kids' abilities to delay gratification gotten better or worse over the years?

You might be tempted to answer “worse,” given all the alarming studies published about how electronic devices like smartphones and tablets are frying kids' brains, crippling their ability to self-regulate and generally turning them into screen-addicted zombies.

But you'd be wrong.

John Protzko, a researcher at the University of California at Santa Barbara, wanted to find out whether kids were getting better or worse at the marshmallow test over time. So he gathered and analyzed the results of over 30 published marshmallow test trials administered between 1968 and 2017.

For each study, he plotted the average amount of time kids were able to delay eating the marshmallow. He also corrected for differences in kids' ages when taking the test (older kids are better at delaying gratification than younger ones).

Here's what that trend looks like.

“Kids these days are better at delaying gratification on the marshmallow test,” Protzko writes. “Each year, all else equal, corresponds to an increase in the ability to delay gratification by another six seconds.”

This was something of a surprise. Before running the analysis, Protzko had surveyed 260 experts in the field of cognitive development to see what they predicted would happen.

Over half said they believed that kids' ability to delay gratification had gotten worse over time. Another 32 percent said there's be no change, while only 16 percent said kids' self-control had improved in the past 50 years.

The experts, it seems, were just as pessimistic about the abilities of today's kids as everyone else.

It's not clear what, exactly, could be causing kids' performance to improve — it's not like they teach the marshmallow test in schools. Kids are improving in other areas too: Protzko notes that IQ scores have increased at a similar rate to the marshmallow test scores, suggesting a possible link between the two.

On a whole host of other measures — substance use, sexual behavior, seat belt use, to name just a few — teenagers today are performing much better than their peers from several decades ago. Many of these measures reflect precisely the sort of gratification-delaying ability that the marshmallow test has been shown to predict.

Given all the good news about kids, Protzko wanted to know why so many experts had such a dour outlook.

Marshmallow test aside, Protzko's just as interested in why so many experts predicted it incorrectly. “How could so many experts in cognitive development believe that ability to delay gratification would decrease?” the paper asks. He calls it the “kids these days” effect: “the specifically incorrect belief that children in the present are substantively different and necessarily worse than children a generation or two ago.”

He notes that elders have been complaining about children's shortcomings since at least 419 B.C., when Greek playwright Aristophanes wrote “The Clouds.”

“It cannot be that society has been in decline due to failing children for over two millennia,” Protzko concludes. “Contrary to historical and present complaints, kids these days appear to be better than we were. A supposed modern culture of instant gratification has not stemmed the march of improvement.”