Sometimes science and psychology stray into the region fondly known as the bleeding obvious.

The phrase was ringing in my ears when I read of a joint experiment conducted recently by the universities of Greenwich in London and Modena in Italy. Researchers used different passages from one of the Harry Potter novels or films, in which the malevolent Draco Malfoy, a pure-blood wizard, uses derogatory language about Hermione, whose comes from a less rarified gene pool, calling her "filthy little Mudblood". Some children were exposed to a much less emotive scene, in which Harry selects a wand.

Fast forward a week, and the guinea pigs were asked their opinions about homosexuals, refugees and immigrants. (They must have wondered what had hit them.) Those who had been exposed to the name-calling passage were more sympathetic to these groups than the rest, leading the researchers to conclude "that reading the novels of Harry Potter improves attitudes towards stigmatised groups" and that "contact with fantasy characters can improve attitudes towards dissimilar out-groups".

Well, that's excellent news for a planet where millions of children have read, and watched, Harry Potter. If the influence of fiction is so potent, then the future is now a bit brighter for "out-groups".

I did wonder, however, how social scientists go about their work. Did these academics start with the premise that most readers already believe, that reading makes us better and kinder people? Or were they irritated at the smugness of that article of faith, and want to test it in laboratory conditions? If so, have they been surprised by the results, or merely bolstered by them?

So many questions. But the more I thought about it, the less bleeding obvious these results were. Assuming the children came from similar backgrounds, the shift in their emotional intelligence, thanks to fiction, is startling. Tangible, verifiable evidence that fictional characters exert an influence as powerful as politicians, preachers or parents is rather radical. After all, it is one thing to assume that the benefits of reading include greater understanding of others, and quite another to see results that prove beyond dispute that this is so.

It also explains something that readers already know, intuitively at least. Fiction that broadens our experience rather than reinforces our often narrow comfort zone does not merely open the world up to us, but opens our minds too. Those who scoffed at the fashion that began some decades ago for 'issue-led' books for younger readers have just been wrong-footed. Picture books depicting a multi-ethnic or wholly non-white cast of characters, stories of a child brought up by same sex parents, fiction for teenagers addressing what it is like to be gay or disabled, an asylum seeker or an orphan, or simply overweight and sad have now been given their rightful place. They are an important and for some probably crucial element in helping create a society that embraces everyone and sees difference as something positive, not threatening.

Dislike of what some dismiss as 'right-on' novels is sometimes based less on the political subject matter than on the obviousness of the plot, or the lack of subtlety in tone. Yet if that is true with some of these books, then so be it. There are a great many badly written, obvious and crass novels for all ages that are equally guilty of these crimes, yet which never attempt to challenge or deepen the way we think.

Of course, much of the best fiction of the past and today, be it Dostoevsky or Malamud, James Baldwin or Toni Morrison, JM Coetzee or Aleksander Hemon, is about the predicament of being different and other: unloved, ignored and struggling to get by. You could argue that, pure escapism aside, the impetus for many writers is to generate sympathy for those who cannot ask for it themselves, or would not think to, or who have been long forgotten. Whether it's a bullied schoolchild or a slave who murders her baby to save her from a life of suffering, novelists lace themselves into the shoes of people whose path in life is unimaginably alien or hard, and help us walk a mile with them too.