All fiction follows one of six basic storylines, according to new research

Begging to differ, John Walsh can't even begin to number the ways

What do the following novels have in common: Pride and Prejudice, Brideshead Revisited and Carry On Jeeves? Well yes, they're all written in English by famous English authors, and they all feature characters and dialogue; but on the face of it, they're completely different. Not to Professor Matthew Jockers from Stanford University, they're not.

According to his computerised analysis, they'd all be examples of the "Man in a Hole" form of fiction – an emotional arc in which our hero/heroine starts out happy, hits a patch of unhappiness (Lizzie Bennett discovers her baby sister's been seduced by the cad Wickham, Charles Ryder discovers his best friend Sebastian is a hopeless drunk, Bertie is tasked with stealing an embarrassing manuscript from a prospective father-in-law) and winds up happier and/or wiser at the end.

Prof Jockers suggests that 46 per cent of the world's novels are variants of the Man in a Hole storyline. The remaining 54 per cent, you'll be amazed to learn, follow contrasting "Man on a Hill" storylines: they involve a man/woman who, broadly speaking, has good fortune, reaching a kind of climax (not that kind) half-way through his/her positive and upbeat adventures. There are two slight variants to each storyline, but that's all. Six basic structures and only six. So that's literature sorted.

Literal-minded readers will, by now, be raiding their memory banks for books in which protagonists really do go down a hole or up a hill. I think I've found a couple. HG Wells's History of Mr Polly starts with the eponymous hero down the former. ("Hole," said Mr Polly, "Beastly silly wheeze of a hole.") In Fielding's Tom Jones, the wandering hero climbs up a steep incline and meets the "Man of the Hill" exactly halfway through the book. It's easy to mock.

To the aficionado, Jockers's sheep/goats, wheat/chaff division of imaginative fiction sounds about as sophisticated as dividing the world of music into the up-chord and the down-chord. It sounds, indeed, like the lady in the Monty Python sketch explaining her theory about the brontosaurus (it starts off thin, becomes very thick, then thin again). But it's supposed to be taken seriously, because it's scientific.

Jockers subjected 40,000 novels to his computer program, Syuzhet, which registers how the emotional content of each book changes over time. So in Joyce's A Portrait of the Artist as a Young Man, Stephen starts out neutral (being a baby), endures hardship at school, is happy when he wins an essay competition, guilty about meeting a prostitute, traumatised by a hellfire sermon, and finally – well, finally, he's neutral again, as he plans to go into exile. The emotional arc goes: neutral – sad – happy – sad – very sad – happy – neutral. That's the classic curve of the Man in a Hole storyline right there.

The Professor's findings are illustrated by graphs showing the to-and-fro of characters' feelings curving above and below a line like humps on either side of an emotional equator. But several questions start nagging. Has his analysis any value except when dealing with fictions that feature just one character, emoting away, centre stage? Isn't it a little puerile to ascribe "happy" and "sad" feelings to characters whose interior lives are a complex knot of impulses? Pip in Great Expectations goes through scores of emotions at the hands of Magwitch, Miss Havisham, Stella, Joe Gargery, Herbert Pocket et al, but you could seldom call them simply "happiness" or "sadness" (especially when relating to Stella). Think for two minutes and you'll find novels which don't fit either profile – like Hardy's The Mayor of Casterbridge, for instance, which goes: sad – wretched – happy (for about five seconds) – sad – sad – sadder – wretched – suicidal. Not so much a curve as a vertiginous fall.

The most basic question, however, is: did we really need an American professor to tell us that fiction is a roller coaster of emotions?