Image copyright Getty Images

Republican nominee Donald Trump has vowed to pull off "Brexit times five" in the US presidential elections. Could he do it?

Millions of Britons switched off their TVs and went to bed late on Thursday 23 June in the fairly confident belief that, for better or worse, nothing was going to change.

They awoke to pictures of UKIP leader Nigel Farage telling ecstatic supporters that the "dawn is breaking on an independent United Kingdom".

Could America be in for a similar dawn surprise on the morning of 9 November?

The polls say no...

Image copyright AP Image caption UKIP leader Nigel Farage has campaigned with Trump

At first glance, it does not look likely.

Donald Trump has been trailing Hillary Clinton in most national opinion polls by between 3% and 10%.

That was before the FBI announced it was looking into new documents related to its investigation of Clinton's emails. It remains to be seen how much of an impact that news will have on voters.

Trump and his supporters point out that the polls were wrong about Brexit, but it is a bit more complicated than that.

In fact, apart from an erroneous but fairly uniform late swing to Remain, the polls were all over the place, sometimes putting the Leave campaign ahead, sometimes Remain.

Interestingly, internet polls, with a few exceptions, were predicting a Leave victory in the weeks leading up to the referendum, while those conducted over the phone were pointing to a Remain win.

But the underlying assumption, among the political and media establishment, was that the voters' natural caution would kick in and they would opt for the status quo.

The bookmakers - whose views on such matters always carry more weight in the UK - were in agreement.

And even the biggest cheerleaders for Brexit were talking down their chances of victory. Within minutes of the polls closing on 23 June, Farage told a TV reporter: "[It] looks like Remain will edge it."

...But faith in pollsters' methods has taken a knock

Image copyright AP Image caption Mobile phones can complicate polling

The Brexit result was a new reputational hit for the polling industry, which had also got it wrong at the 2015 UK and Israeli general elections and in some 2016 US Democratic primaries. The pollsters have yet to figure out a way to fix things.

In the UK and the US companies are finding it increasingly difficult to capture truly representative samples of voters.

It used to be possible to rely on randomly generated landline numbers but the growth of mobile phones - and an increasing reluctance from the public to take part in surveys - has made high-quality polling a difficult and expensive business.

US laws restrict the use of auto-diallers, meaning interviewers have to dial cell phone numbers by hand. It is not unusual to to have to dial 20,000 random numbers just to complete a 1,000-person survey.

Cash-strapped media organisations are increasingly commissioning cheaper internet polls, which are thought to be less accurate by some, even though they appeared to be closer to the truth over Brexit.

One US polling company, IBD/TIPP, which samples an unusually high proportion of cell phone users and claims to be among the most accurate out there, was predicting a closer race than others before swinging towards Clinton.

Ragavan Mayur, president of TechnoMetrica Market Intelligence, which runs the IBD/TIPP poll, said recently the Brexit vote demonstrated the limits of the "proprietary 'likely voter' models" most companies use to predict who will and won't show up on election day.

He also highlighted the more traditional problem of voters not telling pollsters what they really think, which may have been a factor in the Brexit vote: "Trump supporters might have been cautious to report their preference given the derision directed towards them by some elites in the media and elsewhere," he says.

Gallup, one of the biggest names in polling, has simply thrown in the towel, announcing it would not be predicting the winner of this year's presidential election, after getting it wrong last time. It has opted instead to concentrate on researching the issues.

Might non-voters vote?

Image copyright Reuters Image caption The Leave campaign managed to mobilise an army of previous non-voters

Sweep away all of the speculation about polling methodology and you are left with one inescapable fact about the Brexit vote.

Some 2.8 million people - about 6% of the electorate - who had not voted for decades, if ever, turned up at polling stations on 23 June - and almost all of them voted to leave the EU.

"It was more than enough to ensure we lost," writes Remain campaign chief Sir Craig Oliver, in a new book.

"We should have done more to understand their concerns and persuade them why leaving the EU would be bad for them."

The Remain campaign had listened to the experts, says Oliver, who had told them that non-voters don't vote.

But the experts were wrong.

If this pattern was repeated at the US election, Trump would arguably be looking good for the White House. Particularly if Democratic voters fail to turn out in the sort of numbers they did for Obama in 2012.

Like the Clinton campaign, the Remainers put most emphasis on dire warnings of a leap into the unknown.

But they had not counted on the depth of anger in working-class communities, who, it appears, felt their views on immigration and globalisation had been ignored for too long by what they regarded as a self-serving political elite.

Referendums and elections aren't the same

Some Brexit supporters - like some Trump supporters - were convinced that the vote would be rigged by the powers-that-be. Some even urged their friends on social media to bring pens to polling stations, in case the security services tried to erase the pencil marks on the ballot papers.

Referendums are very different beasts to general elections, however. The result does not hinge on the outcome of a few "battleground" or marginal contests. Every vote has equal weight.

The Brexit referendum also had a far higher turnout, at 72%, than many are expecting in the race for the White House, given the unpopularity of the two main candidates.

But making predictions is a dangerous business at this most unusual of elections.

"It's not in the bag"

Image copyright Getty Images

Nate Silver, of the FiveThirtyEight blog, who famously predicted the correct result in all 50 states at the 2012 US election, is more bullish about Trump's prospects than most number-crunchers.

He suggests, in a recent post, that many pollsters have not factored enough uncertainty into their models, particularly given the popularity of third-party candidates and the high number of undecideds.

He still believes Clinton is "probably" going to be the next President of the United States, but adds: "You shouldn't give up if you're a Trump supporter, or assume you have it in the bag if you're voting for Clinton."

Traditionally, when desperate politicians are confronted with evidence of their own unpopularity, they have mumbled something about the only poll that matters being on election day.

This time it might actually be true.

Join the conversation - find us on Facebook, Instagram, Snapchat and Twitter