For much of last week, the predicted track of Hurricane Irma snaked across Florida from south to north. When it seemed to be headed toward Miami, residents on the Atlantic Coast feared the worst, and many on the west side of the state felt safer by comparison.

By Saturday, however, the storm track shifted to the west, putting Gulf Coast cities like Naples, Fort Myers and Tampa at risk of the most punishing winds and storm surge.

Floridians who had traveled from east coast cities to the west in search of safety were whipsawed, as were those living in the west; Collier County, which includes Naples, did not order its evacuation until Friday.

“We kind of thought ‘Oh well, maybe we’ve got some breathing room,’” said a spokeswoman in Collier County, Kate Albers. “And now it’s bearing down on us.”

The wandering forecast has been a source of consternation for Florida residents. But was this a failure of the models that help officials plan for storms?

Hurricane Irma has confounded even the experts. Brian McNoldy, a researcher at the University of Miami and respected blogger on tropical storms and hurricanes, decided on Thursday to evacuate from South Florida with friends and his two dogs and drive to the Tampa area.

He said he was willing to take on the risk of a powerful storm, but the prospect of what at the time appeared to be the eyewall of a Category 4 or even 5 slamming into Miami with obliterating force gave him “a sickening vibe,” he said. He recalled thinking, “We don’t want to be here.”

When Irma’s track shifted west, they drove back to face what he expected to be a rough but survivable blow.

Even considering his own actions, he says officials in cities on the west coast of Florida could have been more attentive.

“From my perspective, the east coast and the west coast have been equally in play for the last week,” he said. Counties like Collier, which includes Naples, should not have been as confident as they seemed to be.

“When the Keys and Miami started to do evacuations, they should have done Naples and Fort Myers and Tampa equally,” he said. “There’s too many people at risk, the storm is big and it’s strong, and there doesn’t seem to be anything in its way to weaken it.”

But the technical forecasting for the storm, he said, was better than average given the current state of the science. “The models did very well with this,” Dr. McNoldy said.

As he explained, “A hundred miles is the difference between the east coast and the west coast — but a hundred miles in a three-day forecast is really good.”

With such a skinny state, he said, small shifts in the storm track within the broad cone of probability meant the difference between running up the east coast or the west, with nothing in current technology capable of saying with more certainty which coast it would be.

“We’re very many moons away from having accuracy like that” from three days before a storm hits, he said.

Many people trying to use forecasts like those provided by the National Hurricane Center, however, do not fully understand the cone of probability and focus instead on the line that runs down the middle, taking it as an accurate prediction of the storm’s path.

J. Marshall Shepherd, an atmospheric scientist at the University of Georgia, explained the fallacy in a Facebook post. “Anywhere in that cone is a possibility,” Dr. Shepherd wrote, “and it has always been a challenge communicating what the cone ‘means’ versus what people ‘think’ it means.”

He wrote it was “somewhat similar to why we have to issue rain forecasts as ‘percent chance of rain’ rather than telling you exactly that it is going to rain on your house at 5:42 p.m.”

That leaves a gap between what the computer models can do and what people need, said Matt Lanza, a weather forecaster in the energy industry and managing editor of the site Space City Weather.

The fact that the track was within 50 to 75 miles of where the storm is headed is “a good forecast, in model speak,” Mr. Lanza said. “But from a human perspective, it poses enormous communication and risk challenges.”

The degree of uncertainty inherent in the forecasting technology often makes it difficult for officials to make reliable stay-or-go decisions. By comparison, Mr. Lanza said, the predictions for Hurricane Harvey’s landfall covered an enormous area, from Northern Mexico to just southwest of Houston.

While Harris County, Texas has a population of 6.5 million people, much of that coast is more lightly populated. But with millions of people crowded along either Florida coast, “where the exact center goes has enormous implications on what weather you see in Miami versus Fort Myers or Naples.”

The National Hurricane Center incorporates dozens of computer models into its forecasts of where a storm may go and how strong it will be. Two of the best known models are the GFS, or Global Forecast System, produced by the National Centers for Environmental Prediction within the National Oceanic and Atmospheric Administration, and the European model produced by the European Center for Medium-Range Weather Forecasting, which is supported by 34 nations. For years, the European model has had a decided edge, as was the case of Irma as well, though the American system has been improving.

“No single model is going to be right every time,” Mr. Lanza noted, and considering the tremendous amount of data that has to be digested to come up with forecasts, “I give extreme credit to the National Hurricane Center for the work they do.”

More accurate predictions are possible, said Jeff Masters, director of meteorology for Weather Underground, but they require an enormous investment in research — something that the United States has failed to do.

Dr. Masters cited a 2007 report from the National Science Foundation’s National Science Board that concluded the United States should spend $300 million a year on “urgently needed hurricane science and engineering research and education.” That is 10 times what the nation currently spends. “They said the benefits of that investment would pay off — and now we’re seeing exactly what they were talking about,” he said.

“With climate change expected to make the strongest hurricanes stronger in coming decades, storms like Harvey and Irma will assault our coasts with increasing frequency,” Dr. Masters said. “Our hurricane vulnerability problem is going to get progressively worse unless we dedicate more resources to the problem.”