For Ugandan students, watching the Disney film, Queen of Katwe could mean the difference between getting into university and not. According to a new study from Oxford’s department of economics, students who watched the biopic about a girl from the slums of Kampala turned world chess champion as little as a week before national exams performed better.

Researchers have established that the psychology of how students feel, how motivated they are, while taking a test can be as important as studying. The goal of the this recent study, by Emma Riley, a doctorate student, was to examine whether exposure to a role model can inspire that motivation, as measured by how hard they try on their exams.

In the study, 1,500 secondary students in Kampala were taken to the cinema to watch either Queen of Katwe or a placebo film, Miss Peregrine’s Home for Peculiar Children, about children with supernatural abilities. Queen of Katwe is based on the true story of Phiona Mutesi, a teenager from the Kampala slum of Katwe, who through persistence and determination, goes from selling corn on the street to getting into a top school in the capital so she can play chess.

The students in the study watched the film between one week and one month before taking their national qualifying exams.

Those completing their final year of school who watched Queen of Katwe showed an improvement of 0.13 standard deviations from a previous mock exam and were 6 percentage points more likely to get a place at a public university. Younger students completing their fourth year of school (S4 students) also improved their overall scores and were 11 percentage points less likely to fail the math component of their exams.

The benefits were the most pronounced for female students. Fourth year students at lower-ranked schools also saw the most improvement, which suggests, according to Riley, “that small changes at those schools could also have a big effect.” She concludes, “One way to do this… is to place more emphasis on motivation and inspiration through example, to give more meaning to the students of how education can help them to achieve their life goals.”

Riley’s study also shows that even role models on screen can have a meaningful impact on the aspirations of students. Other research has found similar results. A 2011 study found that female calculus students were more motivated to pursue STEM careers after being exposed to photographs and videos of women in science. Researchers found changes among rural Ethiopians who were shown documentaries about people from similar backgrounds improving their socioeconomic situations. Even two years after watching the films, they were saving more and were more likely to enroll their children in school.

“The role model does not have to be available in real life to inspire and have a positive effect on students,” Riley says.