Pi’s resilience is incredible once you realize what happens on board the lifeboat and how Pi copes with the tragedy that he witnesses and endures. There’s more to the story than the boy and the tiger. Though what really happened is terrible, Pi chooses to tell a different story. His parallels what really happened, but is beautiful not bleak, transcendent not nihilistic.

“Which story do you prefer?” he asks at the end.

***

This questions turns out to matter a great deal if you are trying to figure out who grows after trauma and who gets swallowed up by it, a question that each movie addresses and that psychologists have been grappling with for years. Think back to the last time you experienced a loss, setback, or hardship. Did you respond by venting, ruminating, and dwelling on the disappointment, or did you look for a faint flash of meaning through all of the darkness—a silver lining of some sort? How quickly did you bounce back—how resilient are you?

The New Yorker’s Richard Brody criticized Silver Linings Playbook for its sentimentality and “faith-based view of mental illness and, overall, of emotional redemption.” The New York Times’ A. O. Scott made a similar, if predictable, criticism of Life of Pi: “The novelist and the older Pi are eager … to repress the darker implications of the story, as if the presence of cruelty and senseless death might be too much for anyone to handle … Insisting on the benevolence of the universe in the way that Life of Pi does can feel more like a result of delusion or deceit than of earnest devotion.”

But these criticisms miss the point. First, they fail to understand why these two strange and idiosyncratic movies, both based on novels, resonated with so many millions of people. Their themes of resilience speak to each of us—and there is a reason for that. The key insight of each movie is, whether their creators realized it or not, grounded in a growing body of scientific research, which Brody and Scott overlook.

Far from being delusional or faith-based, having a positive outlook in difficult circumstances not only is an important predictor of resilience—how quickly people recover from adversity—but it is the most important predictor of it. People who are resilient tend to be more positive and optimistic compared with less resilient folks; they are better able to regulate their emotions, and they are able to maintain their optimism through the most trying circumstances.

This is what Dennis Charney, the dean of the Mount Sinai School of Medicine, found when he examined approximately 750 Vietnam War veterans who were held as prisoners of war for six to eight years. Tortured and kept in solitary confinement, these men were remarkably resilient. Unlike many fellow veterans, they did not develop depression or post-traumatic stress disorder after their release, even though they endured extreme stress. What was their secret? After extensive interviews and tests, Charney found 10 characteristics that set them apart. The top one was optimism. The second was altruism. Humor and having meaning in life—or something to live for—were also important.