This is the sixth article in a series that reviews news coverage of the 2016 general election, explores how Donald Trump won and why his chances were underrated by the most of the American media.

By one measure, Wisconsin was the most important state in the nation in November. According to FiveThirtyEight’s tipping-point calculation, it was the state that put Donald Trump over the top to 270 electoral votes and the White House. (Or at least arguably it did: Pennsylvania has a competing tipping-point claim. ) So here’s an interesting question: How many times did Hillary Clinton visit Wisconsin during the general election? The answer: Zip, zilch, nada. She didn’t set foot in the Badger State after losing the Democratic primary there to Sen. Bernie Sanders in April.

So, case closed, right? Clinton had an incompetent Electoral College strategy and maybe even blew the election because of it? Well, yes and no. She probably should have campaigned in a broader range of states. In particular, she should have spent more time in states, such as Wisconsin, where she was narrowly leading in polls but that had the potential to flip to Trump if the election tightened, as it did during the final 10 days of the campaign.

This very probably didn’t cost Clinton the election, however — and the importance of Electoral College tactics is probably overstated in general. I’m going to save that discussion for the next article in this series, but in the meantime … I come in praise of Trump’s Electoral College approach and in criticism of Clinton’s. Indeed, Trump was pretty close to having an optimal Electoral College strategy as judged by our tipping-point calculation. Clinton made a couple of mistakes, meanwhile. So did campaign reporters, who usually lauded Clinton’s strategy while maligning Trump’s, making essentially the same errors that the Clinton campaign did.

Which states did the candidates consider to be most important? Perhaps the best gauge is simply where Clinton and Trump spent their time. Clinton’s campaign (less so Trump’s) had enormous resources to spend on television advertising, enough that she probably encountered diminishing returns among swing-state voters who had seen as many of her commercials as they could stand. Candidate visits, however, are the ultimate scarce resource. No matter how much money or how many staffers you have, you’ll only have one Hillary Clinton or Donald Trump.

Here, then, is how the candidates distributed their time from Sept. 1 through the day before the election, based on the share of their public events that occurred in each state. (Note that Trump overall was a considerably more active campaigner than Clinton, holding 105 events to her 70 during this period.) For comparison, I’ve listed how likely each state was to be the tipping-point state, based on how it ranked on average from Sept. 1 to Nov. 7, according to our polls-only model.

SHARE OF PUBLIC APPEARANCES,

SEPT. 1 TO NOV. 7 STATE TIPPING-POINT PROBABILITY CLINTON TRUMP Florida 17.4% 20.0% 18.1% Pennsylvania 11.5 11.4 11.4 Michigan 9.0 4.3 5.7 North Carolina 8.6 14.3 11.4 Ohio 8.2 11.4 9.5 Colorado 6.1 1.4 7.6 Wisconsin 6.1 0.0 2.9 Virginia 5.7 0.0 3.8 Minnesota 4.5 0.0 1.0 Nevada 3.2 4.3 4.8 New Hampshire 2.5 4.3 6.7 Arizona 2.5 1.4 1.9 Georgia 2.0 0.0 0.0 Iowa 1.9 4.3 2.9 New Mexico 1.5 0.0 1.0 Trump probably had a better tipping-point strategy than Clinton Tipping-point probabilities based on FiveThirtyEight’s polls-only model Sources: Conservative Daily News, HillarySpeeches.com.

One thing to notice is that Clinton and Trump’s strategies are not all that different. Clinton has been criticized for not spending enough time in Michigan, for instance, but on a percentage basis, she spent only slightly less time there than Trump did.

Still, Trump’s strategy was closer to the one we would have recommended. There were two major errors, from our standpoint, in Clinton’s approach.

Error no. 1: Clinton focused too much on close states rather than tipping-point states. On average from Sept. 1 through Nov. 7, the closest states in our polls-only model were Ohio, Nevada, North Carolina, Iowa and Florida. And yet Clinton spent more time in these states than she should have. A combined 54 percent of Clinton’s events (and 47 percent of Trump’s) were held in these states, whereas there was only a 39 percent chance that one of them would be the tipping-point state.

How can it have been a mistake for Clinton to focus on these states when they were so close? In a nutshell, they weren’t “must win” states for her. On average during this period, Clinton was projected to win roughly 310 electoral votes. A slightly Republican-leaning state such as Ohio might easily have given Clinton her 300th or 320th electoral vote in the event of a clear win nationally. But others, like Pennsylvania, were more likely to provide the decisive 270th electoral vote, and that’s what the tipping-point calculation measures.

A good rule of thumb is that tipping-point states are those polling closest to the national average. Before FBI Director James Comey’s letter to Congress, for instance, Clinton’s lead in Michigan had been roughly 6 percentage points. She was up by about the same amount in Wisconsin and Pennsylvania. But she was leading nationally by about 6 points, also. Therefore, states like Michigan were actually good ones for Trump and Clinton to campaign in, on the prospect that they’d become competitive if the race tightened, as it did — better than states like Ohio or Iowa, which were closer at that moment but further from the tipping point.

It’s also the case that the best defense is sometimes a good offense. Florida and North Carolina might not have been must-win states for Clinton, but they potentially were must-wins for Trump. So it wasn’t a bad idea for her to be spending some time in them. In general, however, the correct strategy for a candidate with an overall Electoral College lead can be surprisingly conservative, involving spending time and money in states that seem fairly safe but that could slip in the event of a shift in the race or systematic polling error. In Clinton’s case, that would have included more time in states such as Michigan, Wisconsin and Colorado.

Error no. 2: Clinton was overconfident and campaigned in too narrow a range of states. Clinton played a considerably narrower map than Trump did. In addition to Wisconsin, she also skipped Virginia, Minnesota and New Mexico during the closing stages of the campaign; Trump visited all of those states. And she spent much less time than he did in Colorado.

Apart from Wisconsin, Trump didn’t win any of these states (although he came close in Minnesota). But he had more or less the right strategy given the overall uncertainty in the race. The point is not that candidates are supposed to be clairvoyant — that it should have been obvious to Trump and Clinton that they needed to campaign in Wisconsin but didn’t have to worry about Colorado, for instance. In an alternate reality, college-educated suburbanites — instead of whites without college degrees — might have shifted toward Trump late in the race, narrowly putting him over the top in Colorado. It’s precisely because the polls can be wrong in ways that you don’t anticipate — and because news events can shift them in unpredictable ways — that you want to play a fairly broad map.

Why did the supposedly data-savvy Clinton campaign make these mistakes? Perhaps because they’re easy mistakes to make. I’m sure that it had highly sophisticated forecasts and models of the campaign and has a rigorous understanding of concepts such as tipping-point states. But for both technical and nontechnical reasons, it’s much easier to build an overconfident model than an underconfident one. This can especially be the case when you rely on proprietary data, such as internal polls. As I’ll describe in a future article in this series, it’s not clear that internal polls are better than public polling averages. If campaigns wrongly believe that they’ve solved the riddle of polling, they might make overconfident decisions, going “all in” on certain strategies instead of diversifying their approach.

Furthermore, decisions about where to spend time and money aren’t made in a vacuum. Like any other kind of organization, campaigns are subject to internal politics and potentially misaligned incentives, and their decisions can be influenced by outside groups, such as donors and the media. Making the technically correct decision may not be easy if it contradicts the conventional wisdom, and correct Electoral College strategy (i.e., not necessarily campaigning in the closest states if they aren’t near the tipping point) is often slightly counterintuitive.

Speaking of the conventional wisdom, we should talk some about how the media covered Clinton’s and Trump’s Electoral College tactics. Being among the most technical aspects of the campaign, this was generally not a strength of mainstream coverage. For instance, on Oct. 30, The New York Times jabbed at Trump for “campaigning well outside the traditional band of states that decide presidential elections,” including in New Mexico and Michigan, “two solidly blue states where polling has shown Mrs. Clinton with a clear lead” — failing to recognize that they were potentially tipping-point states even if Clinton was ahead there. A few days later, on Nov. 3, the Times criticized Trump for campaigning in too wide a range of states:

Rather than wielding data and turnout machinery as tools, Mr. Trump has instead battered at the political map in a less discriminating way, trying to shift the national race a point or two in his favor and perhaps find a soft spot in Mrs. Clinton’s support.

This was, it would turn out, pretty much exactly the strategy that swung the Electoral College to Trump. The national race tightened by a percentage point or two — actually a bit more than that after Comey’s letter to Congress — and Trump found a soft spot in Clinton’s support in Wisconsin, Michigan and Pennsylvania. As you read appraisals that second-guess Clinton campaign’s tactics, keep in mind that reporters often had the same blind spots. Trump was also often scolded by pundits and analysts for campaigning in the very states that would win him the presidency.

To some extent, the media’s misconceptions about Electoral College strategy and Clinton’s errors may have reinforced one another. For the most part, decisions about where to allocate resources should be determined by where states line up relative to one another. Typically, news events produce similar changes in lots of states at once, so even a major shock (say, Comey’s letter or the release of Trump’s “Access Hollywood” tape) won’t change the correct Electoral College approach all that much. The chart below provides some examples of how states’ tipping-point probabilities were fairly steady, even with all the ups and downs of the campaign.

Despite this, the media tended to read these tactical decisions as revealing a candidate’s absolute strength, rather than the relative importance of the states. A foray into traditionally Republican Arizona, for instance, would be read as a sign of strength for Clinton while a trip to traditionally blue Wisconsin would be seen as an admission of weakness. If a candidate was too concerned about her media clippings, that could inhibit correct decision-making. One wonders whether the reason Clinton never totally abandoned Iowa, for instance — even though she rarely polled well there and it was highly unlikely to be the tipping-point state — is because doing so would have occasioned a media freakout.

Conversely, Trump’s data team wasn’t likely to get a lot of credit from the media almost no matter what it did. With rare exception, reporters tended to portray Trump’s Electoral College strategy as being whimsical and haphazard, even when it was doing some pretty smart things. That may have helped Trump’s team to shut out the noise and maximize its candidate’s chances of winning the election.