They call it the "marshmallow test." A four- to six-year-old-child sits alone in a room at a table facing a marshmallow on a plate. The child is told: "If you don’t eat this treat for 15 minutes you can have both it and a second one." Kids on average wait for five or six minutes before eating the marshmallow. The longer a child can resist the treat has been correlated with higher general competency later in life.

Now a study shows that ability to resist temptation isn’t strictly innate—it’s also highly influenced by environment.

Researchers gave five-year-olds used crayons and one sticker to decorate a sheet of paper. One group was promised a new set of art supplies for the project—but then never received it. But the other group did receive new crayons and better stickers.

Then both groups were given the marshmallow test. The children who had been lied to waited for a mean time of three minutes before eating the marshmallow. The group that got their promised materials resisted an average of 12 minutes.

Thus, the researchers note that experience factors into a child’s ability to delay gratification. When previous promises have been hollow, why believe the next one?