Opening a jar of pickles should not be that difficult. And while you are busy mumbling, grimacing, hopping on one foot and holding the jar against your hip until the lid pops open, a young brain may be analyzing the spectacle and learning from it.

Researchers at Massachusetts Institute of Technology have found infants who watched an adult struggle and then succeed at something were more likely to show perseverance themselves when faced with a completely different task.

Previous research has shown babies can imitate actions and learn concepts from a few examples. The new study, published Thursday in Science, found babies can also infer values—such as when it is worth it to keep trying—from adults’ behaviors. “The kinds of inferential mechanisms that babies use to learn concepts or things about the world, they can also use and learn to change how they act in the world,” says Laura Schulz, a cognitive scientist at MIT and senior author of the study. “We don’t realize how much babies are watching us and drawing inferences from our behavior.”

Julia Leonard, a graduate student at MIT and lead author of the work, recruited 262 babies between the ages of 13 and 18 months who were visiting the Boston Children’s Museum. Leonard presented the infants with one of three scenarios. The first involved a bit of acting. Leonard pretended to be a “struggling” adult wrestling with two different toys: a tomato container that had a rubber frog inside and a carabiner attached to a cow key chain. Using speech that engaged the child, along with eye contact and puzzled phrases such as “Hmmm, how do I get my toy out of here?” she pretended to struggle with each of the toys for 30 seconds before successfully opening the container and taking the key chain off the carabiner.

Leonard then showed each subject a different toy—handmade from the mechanism inside a musical Hallmark card—and secretly activated it, using a hidden button on its side to show the child that it worked. But she had designed the toy so that it would be difficult to figure out how to activate it (although a few little masterminds did and were excluded from the results). On the top was a large, nonfunctioning button, which for an infant would clearly seem like the way to activate the toy. After playing five seconds of “Twinkle, Twinkle Little Star,” she handed the toy to the baby and left the room.

In the second scenario she showed minimal effort in opening the container or detaching the key chain. Within 30 seconds she swiftly reached her goal three times with each object. She then again took out the musical toy, handed it to the infant and left the room. In the third variation she did not act out anything and proceeded directly to handing the child the toy.

The infants who had seen Leonard show effort for 30 seconds before achieving her goal of opening the container and detaching the key chain from the carabiner pressed the toy button a significantly greater amount of times—showing persistence—compared with those who saw her quickly reach her goals or did not see her do anything.

This study does not merely demonstrate imitation. “We certainly know that babies can watch somebody and figure out what they are trying to do,” says Paul Harris, a developmental psychologist at Harvard University who did not take part in the research. “But this goes considerably beyond that in showing that babies can watch somebody and gauge the persistence with which they try to do something, and then emulate that when they themselves are facing something challenging.” Harris and others have long pondered how children acquire “mind-sets”—the thoughts and ideas brought to intellectual tasks—such as valuing persistence or assuming one does not have the ability to do something. “Here’s a piece of evidence that an adult can influence even a toddler, and in a fairly direct sort of way, by modeling this persistent behavior,” he notes.

Most previous research on mind-sets has focused on school-age children. For Lucas Butler, a developmental psychologist at the University of Maryland, College Park, who was also not part of the work, the young age of the subjects made this study most interesting. “The fact that [babies] can get these messages just from watching someone and then internalizing it tells us that if we want to be raising children who are persistent—who have what you might call ‘grit’—we ought to be starting early and we ought to be thinking about how we model our own approach to challenges,” says Butler, who also wrote a perspective article published in the same issue of Science.

After repeating the same experiment and achieving similar results, Leonard wanted to test a more realistic situation. When adults struggle in real life, they are more likely to be concentrating on the task and not reaching out with cues to the child. Leonard repeated the experiment a third time, in which she did not make eye contact with the infant and did not speak in a child-friendly way. Rather than saying, “Hmm, how do I get this out of here?” in an engaging “baby voice,” she said it to herself in an ordinary tone. As in the original experiments, the infants still seemed to learn that effort was valuable—but they did not persist in the button-pressing task as much as when Leonard had given child-friendly cues. “It is curious why learning isn’t as strong when [babies] just observe the person,” as opposed to getting interactive cues, says György Gergely, a developmental cognitive scientist at Central European University in Budapest, who was not involved in the research. But “for me, the most interesting question was: Can you show that it’s worth being persistent? This study suggests, indeed, it is possible.” He is cautious about drawing major conclusions, however. “It is not quite clear what mediates this effect,” Gergely says. The researchers say they would like to further explore what factor had the greatest influence on the infant—whether it be the talking, the gesturing, the tone or something else altogether.

In follow-up studies the researchers hope to explore how long-standing the effects of being exposed to persistence are, especially as infants grow up and begin to attend school, as well as how they would respond if the adult failed at a given task after trying hard. Schulz is also interested to know whether these results hold out in the real world—in babies’ homes. She says she has “a lot of respect for parents, especially speaking as one, so I wouldn’t presume to give parental advice based on a laboratory study.” She adds, however, that she hopes “it maybe provides a little reassurance that you don’t have to make everything look like it comes easily.”