A-level students may want to re-think what course they study at university as getting a first could depend on their gender, race and educational background.
Psychologist Patrick Leman's study of the results of more than 10,000 students at Cambridge university over a two-year period found that in history white, independently-educated men achieved more firsts than their peers.
In maths, while more men got firsts than women, students from ethnic minorities performed proportionately better than those from the majority white group.
Men and women performed equally in law, but students who had previously attended comprehensive schools ended up with proportionately more first-class marks than those from private schools. And women outperformed men in biochemistry and physiology.
Dr Leman, a lecturer in psychology at Royal Holloway university, told The TES: "I think this is all to do with expectations about the sort of person who does well at certain subjects.
"These expectations work at several levels. They influence who applies for what subject at university. For example, more women apply to read arts.
They also influence the student themselves because, generally, we take on board others' expectations about who we are and internalise aspects of them."
For example, he says, we perceive a brilliant maths student as someone rather nerdy, into science fiction and not terribly extrovert and also probably male. So if a woman chooses to do maths at Cambridge, she is probably partly recognising that she's going against social stereotypes.
So will this work against her?
"This doesn't mean she can't or shouldn't apply," Leman says. "But it does mean that she probably has to overcome more barriers, both academically and socially, in terms of expectations of a successful maths student."
Teachers' and students' expectations do play a crucial part in performance at university, but Dr Leman said these stereotypes existed throughout society and in the media.
For example, he asks, how many mad female scientists do we see in movies or on TV? "The seeds for academic performance at university and variations in performance may be sown long before a student actually begins his or her course."
Dr Leman admits that the impact of academic performance relating to gender is easy to spot because "it's a simple, ubiquitous distinction that pervades society".
But, he adds, ethnic differences in academic performance may be due to more complex social processes and expectations.
He says: "In the Cambridge sample we found that the worst performers of all were black men. This was regardless of the subject area. And also, importantly, regardless of ability because all the Cambridge undergraduates are top-ability students.
"But this reflects what is happening in school, where the big failers are black, working-class boys."
So what about an ambitious A-level student who may want to re-evaluate what to study at university?
Dr Leman replies: "I'd say that if you want a first, the only way to get it is to work hard and have an aptitude for the subject. Of course no university assessment regime is perfect and no environment is without its associated prejudices and stereotyped expectations.
"Failure is inevitable for no one. Women can succeed in physics just as state-educated black women can become excellent historians."