Pundits have been criticized for declaring Hillary Clinton the winner over Bernie Sanders in this week’s Democratic Presidential debate. PHOTOGRAPH BY JOHN LOCHER / AP

In the media coverage of Tuesday’s Democratic debate, there was almost universal agreement that Hillary Clinton came out on top. In online polls, several focus groups, and much of social media, though, the story was rather different. Many people insisted that Bernie Sanders was the victor, and that the lame “M.S.M.” had gotten it wrong again.

I experienced this difference of opinion firsthand. In the early hours of Wednesday morning, I pronounced Clinton the big winner, saying that she had been “sharp, personable, and assured.” I also said that Sanders “gave a good account of himself,” but that didn’t satisfy some readers. Within hours, the complaints were raining in—on Twitter, on Facebook, and elsewhere. Had I been coöpted by the Clinton campaign? Was I watching the same debate as everybody else? Did I have a clue what I was writing about?

For the record, my answers are no, yes, and I hope so.

It’s certainly possible that I, and many other commentators, got it wrong. The media has erred before, plenty of times. Back in April, when Sanders announced his candidacy, many observers wrote him off as a fringe candidate who wouldn’t have much of an impact. I didn’t make that particular error: indeed, I welcomed Sanders to the race, pointing out that he would “provide a voice to those Democrats who agree with him that the U.S. political system has been bought, lock, stock, and barrel.” That one I got right. But on the Republican side, after Donald Trump jumped in, I underestimated his staying power, as did many other members of the media. Did we get the Democratic debate wrong, too?

Let’s look, briefly, at the case for the prosecution. At AlterNet, the alternative-news site, Adam Johnson pointed out, “Sanders won the CNN focus group, the Fusion focus group, and the Fox News focus group; in the latter, he even converted several Hillary supporters. He won the Slate online poll, CNN/Time online poll, 9News Colorado, The Street online poll, Fox5 poll, the conservative Drudge online poll and the liberal Daily Kos online poll. There wasn’t, to this writer’s knowledge, a poll he didn’t win by at least an 18-point margin.”

At the other end of the ideological spectrum, Dick Morris, the Republican political strategist and Clinton antagonist, suggested that the media no longer understands a Democratic electorate that has moved to the left and is now highly issues-oriented. “Sanders identified and successfully focused on his two main issues: First, income inequality and the need to break up the big banks and second, the need for more restraint in committing military forces abroad,” Morris wrote on his Web site. “These two positions, clearly articulated in the debate will impel Sanders to a steep rise in the polls.”

The ultimate arbiter of who won the debate will, of course, be the public, not the pundits. But we won’t get a reliable reading of public opinion until we see some scientifically conducted surveys based on random samples of Democratic voters. The post-debate online polls weren’t of this type: their samples were self-selecting, and you would expect their results to be skewed toward the candidate with the most-committed supporters. In this race, without a doubt, that is Sanders.

The only post-debate poll I’ve seen that employed orthodox surveying techniques was carried out by the research firm Gravis Marketing, and it showed Clinton as the clear victor. Researchers for Gravis asked a random sample of seven hundred and sixty registered Democrats across the United States this question: “Who do you think won the debate?” Sixty-two per cent of respondents said Clinton, thirty per cent said Sanders, and six per cent said Martin O’Malley. It’s just one poll and its results aren’t definitive, but if most Democratic voters, in fact, believe that Sanders won, it is an enormous outlier.

The findings of the media focus groups deserve to be taken more seriously than the online polls, but here, too, representativeness is an issue. For the first G.O.P. debate, Frank Luntz, who runs focus groups for Fox News, organized a panel of Republican voters, which said that Donald Trump had performed poorly. Subsequently, Trump’s lead in the polls increased (and he excoriated Luntz on Twitter). Still, the fact that all three of the focus groups mentioned in Johnson’s article identified Sanders as the winner shouldn’t be dismissed; nor should the participants’ responses. When Luntz asked some members of his group, which consisted of Democratic voters from Florida, for a one- or two-word description of Sanders’s performance, these were some of the responses he received: “for the people,” “strong,” “straightforward,” “confident,” “direct,” “sincere,” “powerful,” “educator,” and “smart.”

As I noted in my post-debate post, Sanders certainly “got his message through.” As Morris pointed out, it’s a message that resonates with many Democratic voters and is forcing other candidates, Clinton very much included, to adapt to it. It may also be true that Sanders benefitted from the fact that many viewers were seeing him for the first time on the national stage, and that the media underestimated this factor. “Beforehand, a third of Democrats said they didn’t yet know enough about Sanders to have an opinion on him,” Andrew Prokop pointed out in a post at Vox. “Even many of those who did know about him likely hadn’t been exposed to him all that much. So when Sanders makes the case at length for why he’s a democratic socialist, many of these voters might not have heard that before—and might like it.”

But just because Sanders did well doesn’t mean he did best of all. In judging the winner of any debate, it’s probably wise to consider at least three questions. Who did the best onstage? Who came out on top in the polls? Who gave his or her campaign the biggest boost?

The second question I’ve already covered. The answer to the first one is subjective, though anybody who was on a high-school or college debate team knows that it’s not entirely so. Based on Clinton’s manner, her ability to react to what others were saying, and her deftness in evading awkward questions, I think she delivered the best performance, even though, as I wrote yesterday, I strongly disagreed with some of her answers, particularly those relating to Edward Snowden. Some of Clinton’s Republican critics agreed with my assessment of her manner. Trump said that she “did what she had to do.” Scott Walker, who dropped out of the race last month, said, “She came across as surprisingly very confident and I thought relatively pleasant.”

So much for technique. The main reason that I think Clinton emerged as the winner relates to the third question: she gave her campaign a huge and much-needed boost. Of all the debate participants, she had the most to lose. After six months in which Clinton struggled to deal with the issue of her use of a private e-mail server while she was secretary of state, Democratic élites and donors were starting to question her abilities as a candidate. A poor performance on Tuesday could well have engendered outright panic. Clinton not only reassured the elected politicians, interest groups, and donors who have thrown in with her; she dealt a big blow to the “draft Biden” movement, which probably, in hindsight, needed its man to be onstage in Las Vegas.

The Clinton campaign believes that it can ultimately deal with a buoyant Sanders, even one who raises more money after the debate or gains a few more points in the polls. A panicking Democratic establishment and a swift entry into the race by Joe Biden would have presented a much more alarming scenario—one that now appears to be receding as a possibility. The Vice-President may still decide to run, but it will be harder for him to portray himself as a savior for the Party.

So let’s give Clinton her due. She had a good night. She won.