It’s finally decision day for the UK’s voters. All that’s left is for the candidates to pose for the cameras while voting at a local primary school, followed by what must seem a very long wait for the release of the exit poll at 10pm.

As they pass the time before polls close, how highly do they rate their chances?

Were I a fly on the wall in Downing Street or in Islington, I’d expect to see Boris Johnson and Jeremy Corbyn each vastly overvalue their chance of victory. This would be a genuinely held belief rather than putting on a brave face. This is because politicians, like the rest of us, tend to be naturally overconfident and overly optimistic.

An example was the 2015 general election, when the exit poll predicted the Liberal Democrats would win just ten seats of their previous 57. This prompted their former leader Paddy Ashdown to state live on BBC TV: “I can tell you, that is wrong. If these exit polls are right, I’ll publicly eat my hat” (the Lib Dems went on to win only eight seats, so Paddy duly ate… a slice of hat-shaped cake).

In 2015 this was in part due to inaccurate pre-election opinion polling, which for example overstated the Lib Dem’s projected vote by two percentage points. But let’s assume for a moment that this year’s polls have been broadly accurate: what explains a candidate’s self-assurance?

This is where behavioral science can add some insight. It’s now accepted among psychologists and behavioural economists that a range of seemingly irrelevant cognitive biases impact important decisions and judgements that we think we’re making in a rational and reflective manner.

Four in particular are relevant to candidates for prime minister as they start mentally measuring the Downing Street curtains.

First, overconfidence. Our subjective confidence in our own ability is greater than our actual performance. We tend to overstate our own performance relative to others and be unduly certain in the accuracy of our beliefs. An amusing example is that 93 per cent of us rate ourselves as an above average driver.

While Johnson and Corbyn may have each run a successful campaign, each will give undue weight to their own performance compared to the other. And as for Jo Swinson, while she’s perhaps thinking something similar about the Lib Dems chance of a breakthrough, there’s some indication that women are less overconfident than men.

Availability bias describes that we make judgements about the likelihood of an event based on how easily an example or personal experiences comes to mind – rather than the facts. This explains why so many of us are scared of shark attacks: while the chances of being eaten by a shark are thankfully minimal, the image is vivid.

For instance, if chants of “Oh Jeremy Corbyn!” at yesterday’s pre-election rallies are more easily brought to mind by Corbyn than his TV mauling by Andrew Neil a couple of weeks ago, this will influence his judgements today.

Moving on to optimism, are tend to me more optimistic about our futures than is objectively true. So for example, while over four in ten marriages end in divorce, few of us on our wedding day would rate our own chances of a long and happy marriage so low (though perhaps this is not the case if marrying Boris Johnson).

Smokers believe they are less likely to contract lung cancer than other smokers. Bungee jumpers believe that they are less at risk of an injury than other jumpers. Candidates for elected office would genuinely believe they are less likely to suffer a defeat than other candidates.

Finally, we all tend to believe and seek information that supports our existing views. We want to hear that we are correct and will engage less with information that implies we are wrong.

Boris Johnson believes that the British people want to ‘get Brexit done’. Every time he hears this said back from a member of the public, he will intuitively place greater importance to that “evidence” than when hearing from a pro-remain voter. He may actively seek information to agree with this view rather than to challenge it; and tend to interpret even ambiguous evidence as supporting his position.

We’ll soon know who’s correct – and who may need to save some appetite this evening to eat a delicious slice of hat.