Researchers from Durham and Northumbria Universities found that people tend to look at others when talking to them, but look away when thinking.

The team studied children with autism, and those with Williams syndrome, as well as healthy children at a similar level of development and intelligence.

Williams syndrome is a genetic disorder, and much rarer than autism, with about one in 20,000 children suffering from it.

It is often considered to be the polar opposite of autism, with sufferers being hyper-social, seeking out interactions with known adults and strangers. They are also often very empathetic and outgoing children.

Although children with both these disorders behave very differently in terms of eye contact with people they're talking to, they and the healthy children assessed all tended to break eye contact and look away when they were thinking or remembering.

To investigate why this might be, the researchers asked children to perform maths problems, either without instruction, or while being told to maintain eye contact with the experimenter.

Autism

People with autism usually have difficulties with social communication, social interaction and social imagination

It is a spectrum condition meaning while all people with autism share certain difficulties, the condition affects them differently

There are over 500,000 people with autism in the UK - that's one in every 100

All children, whether they were autistic, had Williams syndrome, or were healthy controls, made more errors when they were forced to look at the person asking the questions while they answered them.

The researchers concluded that holding eye contact is mentally demanding, so looking away while thinking is therefore beneficial when doing difficult tasks such as solving maths problems.

Debbie Riby, the lead author on the paper, thought this was an important message to present to teachers and other people who work with children.

She said: "One of the really important things for teachers to be aware of is that we shouldn't expect children to keep looking at us, when they're trying to think. And that goes for a teacher of a typically developing child, a child with autism or a child with Williams syndrome.

"If teachers work with pupils with autism, they also need to be aware that these children might be missing important non-verbal cues. We could encourage them to look at us when they're listening, but we shouldn't get that mixed up with when they're thinking."

The researchers were surprised that children with Williams syndrome looked away when they were thinking, as they often stare at people when talking to them, so researchers had wondered whether they wouldn't avert gaze when thinking.

"Eye-tracking studies have shown that they stare or use prolonged fixations towards people, and faces. We thought they would show what we term 'sticky fixation' on faces, and struggle to disengage from them, but actually the children we studied in these tasks need to look away when they're thinking as well.

"We expected that they wouldn't have as much of a drop in performance when they were forced to maintain eye contact, but actually they still needed to look away when they think."

When talking and listening, people get cues from areas other than speech, that autistic children might be missing. But Dr Riby was keen to point out that children with Williams syndrome, despite paying a great deal of attention to faces, aren't expert communicators.

"Looking for too long is as dysfunctional as not looking for long enough. Children with Williams syndrome are not expert face processors. It means they're not naturally allocating their attention to everything around them," she explained.

But how easy is it to tell whether a pupil in class is daydreaming, or trying to work something out?

"If the pupil seems to be on-task and they do seem to be processing information, you can tell they're working it out. If they have lost attention, they might still look at you, but through you," Dr Riby told the BBC.

In their interactive session at the science festival, Dr Riby asked an adult volunteer in the audience to answer some maths problems.

"As soon as we asked him a hard question he averted his gaze, it's easy to show," he said.