Hillary Clinton and Donald Trump. (Left: Getty; Right: Reuters)

In a political season marked by nonstop polling, a lively exchange took place recently about the state of public opinion research and what to believe about all of the numbers describing the state of the race.

The context for the discussion was set by a series of national and state surveys showing Donald Trump gaining on or overtaking Hillary Clinton in the general-election campaign. It broadened into an examination how polls are produced and used in a competitive media environment.

Earlier this spring, Clinton enjoyed a substantial lead over Trump. Now, the RealClearPolitics poll average in the presidential race shows Clinton with a lead of just one point: 43.8 to 42.8 percent. Some recent polls showed Trump ahead, including a Washington Post-ABC News poll of registered voters released a week ago.

The shift raised questions: Is this merely a bounce for Trump because he has wrapped up the Republican nomination while Clinton is still fighting a campaign against Bernie Sanders? In that case, will Clinton reverse Trump’s gains once she has claimed the Democratic nomination? Do the current polls mean that the general election will be close and hard-fought? Most provocatively, is there something wrong with some of these polls?

The first salvo in the exchange came from Norman J. Ornstein of the American Enterprise Institute and Alan I. Abramowitz, a political scientist at Emory University. Both are scholars to whom I’ve gone many times as I’ve reported campaigns and politics generally. The two co-authored an op-ed for the New York Times titled “Stop the Polling Insanity.”

They pointed to what they said were “wild fluctuations and surprising results” in recent Trump-Clinton polls. They also underscored how news organizations are producing polls at a rapid rate and using them to make news and generate clicks. “Too many of this year’s polls, and their coverage, have been cringeworthy,” they wrote.

Ornstein and Abramowitz took issue with a Reuters-Ipsos tracking poll that showed Clinton with a 13-point lead on May 4, a tie five days later and then a six-point lead for Clinton on May 15. They questioned whether opinions could have shifted that much during a time “when there were no major events” in the campaign.

They challenged an online NBC-SurveyMonkey poll that showed Trump within three points of Clinton and said that Trump was receiving 28 percent of the Hispanic vote when “most other surveys have shown Mr. Trump eking out 10 to 12 percent among Latino voters.”

They also raised doubts about a trio of Quinnipiac polls in the battleground states of Florida, Ohio and Pennsylvania, arguing that the samples used in the surveys were “whiter than the states had in 2012” exit polls.

“When polling aficionados see results that seem surprising or unusual, the first instinct is to look under the hood at things like demographic and partisan distributions,” they wrote. “When cable news hosts and talking heads see these kinds of results, they exult, report and analyze ad nauseam. Caveats or cautions are rarely included.”

The two scholars went on to cite well-known challenges for all types of polls. Traditional polls, considered the most reliable over a long period of time, use random samples of the population, call landlines and cellphones, and use real people to conduct the interviews. But those surveys are extremely costly, and response rates for many have plummeted over the years.

Online surveys use panels of potential respondents rather than randomly drawn samples. The methodology differs among the practitioners and is in a regular state of examination and refinement. They are much less expensive to produce.

Ornstein and Abramowitz’s op-ed prompted a rejoinder from Jon Cohen, SurveyMonkey’s chief research officer, and Mark Blumenthal, the firm’s head of election polling. (For the record, Cohen is a former polling director at The Post and someone with whom I’ve worked closely and collaboratively over many years.)

The SurveyMonkey duo took issue with the suggestion that polls showing Trump and Clinton in a close race are almost by definition to be questioned. “It’s not enough for Trump’s opponents to wish him away,” they wrote. “It’s important for political professionals to actually explore what is buoying Trump — even if they find his rise unfathomable.”

They argued that the polls have not been on a wild ride. In fact, they said, there was a clear trend based on the moving average of an average of all polls. Once Trump became the presumptive GOP nominee after his victory in the May 3 Indiana primary, Clinton’s lead began to shrink.

As for the NBC-SurveyMonkey poll showing Trump winning 28 percent of the Hispanic vote, they noted that six other national surveys taken after the reality TV star effectively secured the nomination showed his Hispanic support ranging from 15 percent to 31 percent, while acknowledging they were on the high end. But they said Clinton’s margin over Trump among Hispanics across the six polls ranged from 23 points to 53 points. The NBC-SurveyMonkey poll’s margin was in the middle of that range at 37 points.

Citing the late Andrew Kohut, the founder of Pew Research, they said those in the field of survey research should be measurers not handicappers. “Now more than ever at this moment of reinvention for public opinion polling, we need many independent estimates of voter preferences, not a herd of handicappers issuing their best guesses about the eventual outcome,” they wrote.

Those exchanges prompted another voice to enter the conversation, that of Mark Mellman, a respected Democratic pollster to whom many journalists long have gone for his insights into polls and elections. Noting that Ornstein, Abramowitz, Cohen and Blumenthal were all “very smart people,” Mellman sought to avoid taking sides and instead offered a few thoughts of his own on the issues raised.

Writing in the Hill, Mellman began by saying that an examination of polling averages of RealClearPolitics and the Huffington Post’s Pollster’s model showed that there is “little doubt that the presidential race has tightened considerably” since March and April. But he added that the current state of the race does not necessarily mean the outcome in November will be close.

He reminded everyone that, in the spring of 2008, when John McCain had wrapped up the Republican nomination while Barack Obama was still engaged in a hard contest against Clinton, the general-election polls showed the Arizona senator ahead. He lost the general election by 7 percentage points.

Looking at the issue of Trump’s support among Hispanics in the NBC-SurveyMonkey poll, he said that 28 percent “seems high, but not bizarrely out of sync,” given other polls and history. He also said that if Trump were getting, say, 13 percent of the Hispanic vote rather than 28 percent, Trump’s overall number in the horse race would be just 1.5 points lower.

Polls have played a significant role in this campaign. They’ve determined participation in the GOP debates and how the candidates were aligned on the stage, and they’ve driven a lot of coverage of the race. There is no question that news organizations have sometimes been indiscriminate in the way they have highlighted individual polls.

So there is food for thought in this series of exchanges. The traditional method of polling has become prohibitively expensive for most organizations at a time when the demand for public opinion surveys continues to grow, in politics and other fields. The methodology of all types of polls is under challenge. There is a serious and urgent debate underway among public opinion researchers about the way forward.

For the rest of us, the exchanges lead to common points of agreement, all of which might seem obvious but should not be forgotten. Don’t put too much emphasis on any single poll. Look closely at averages of groups of polls to determine whether there are real shifts in the race. And don’t expect polls to predict the future. Leave that question to the voters in November.