Yet at the same time, betting markets indicated that Remain was a clear favorite. The arguments for making Remain a favorite were understandable, but in retrospect, some look more like wishful thinking than a fair-minded assessment of the data:

■ Polls in Britain had some poor results in the last few years, including in the Scottish referendum and recent parliamentary elections. In the United States, referendum polls can also often be less accurate than general election surveys. In itself, this wasn’t a good reason to discount the possibility of Brexit. But it was used to discount the polls.

■ There were plenty of undecided voters, and it was assumed that undecided voters would break toward the status quo. This was one of the prevailing interpretations of why the polls were wrong about Scottish independence, but oddly, it’s the opposite of the conventional wisdom in American elections — that undecided voters break toward the challenger. There isn’t a tremendous amount of evidence to believe that either interpretation is an especially solid rule of thumb.

■ Most surveys showed that voters thought that Remain would win, and there is a fairly sizable body of evidence that this type of question — about who will win rather than who someone will vote for — does a pretty good job of predicting electoral outcomes. Not this time.

■ Betting markets showed that Remain was favored, and again, there’s plenty of evidence that betting markets are a fairly reliable predictor of election results. Obviously, they were not.

It’s not clear why the betting markets were so confident. Perhaps it was in part because of some combination of all of the previous points, but it might have been a dose of wishful thinking from a pool of relatively affluent globalist gamblers who simply didn’t believe that Brexit could really happen.