Steven Dillingham, the director of the Census Bureau, was four hours late. His charter plane had been delayed by a winter fog — common in Toksook Bay, the remote Alaskan town that he was visiting. The villagers were waiting, prepared to welcome him with a potluck and the performance of a traditional dance.

But when the flight finally touched down last month, Dr. Dillingham had business to take care of. Leaving the airstrip on the back of a snowmobile, he made straight for the home of the village’s oldest resident. There, Dr. Dillingham greeted the woman inside and officially began the government’s decennial attempt to count every person in America.

According to the 2010 census, 590 people lived in Toksook Bay. State demographers expect the total to rise by about 100 people when census results are published next year.

“There has to be an increase in the count. We know we are growing,” said Robert Pitka, a tribal administrator who is leading census outreach in Toksook Bay. “Every person matters for federal funding.”

But Toksook Bay, along with thousands of other small places around the country, may end up with an inaccurate population count.

The law requires individual census records to be kept confidential for 72 years. Fearing that data brokers using new statistical techniques could de-anonymize the published population totals, the bureau is testing an algorithm that will scramble the final numbers. Imaginary people will be added to some locations and real people will be removed from others.

The more the algorithm muddles the results, the more difficult it will be, for example, for a data scientist to combine a set of addresses and credit scores with census results to learn the age and race of people living on a certain block.

While the algorithm helps protect respondents’ confidentiality, a test run on the last census shows it may produce wildly inaccurate numbers for rural areas and minority populations.

According to the official 2010 census, 90 people lived in Kalawao County, on the northern coast of the Hawaiian island of Molokai. At the time, Kalawao was America’s second-smallest county. Results using the privacy algorithm, however, showed 716 people living there in 2010 — almost an eightfold increase.

Large populations mostly stayed the same size under the privacy algorithm. Small populations were affected more by the algorithm. Some doubled in size; others were halved or even disappeared. Black people in counties Counties Places 10,000,000 people in 2010 1,000,000 100,000 10,000 Only tiny Kalawao County showed a major change, increasing from 90 people to 716. Toksook Bay 1,000 100 10 1 No change No change No change ⅛× ¼× ½× 2× 4× 8× ⅛× ¼× ½× 2× 4× 8× ⅛× ¼× ½× 2× 4× 8× Large populations mostly stayed the same size under the privacy algorithm. Counties 10,000,000 people in 2010 1,000,000 100,000 Only tiny Kalawao County showed a major change, increasing from 90 people to 716. 10,000 1,000 100 10 1 ⅛× ¼× ½× No change 2× 4× 8× Small populations were affected more by the algorithm. Some doubled in size; others were halved or even disappeared. Black people in counties 10,000,000 people in 2010 1,000,000 100,000 10,000 1,000 100 10 1 ⅛× ¼× ½× No change 2× 4× 8× Places 10,000,000 people in 2010 1,000,000 100,000 10,000 1,000 Toksook Bay 100 10 1 ⅛× ¼× ½× No change 2× 4× 8× Large populations mostly stayed the same size under the privacy algorithm. Counties 10,000,000 people in 2010 1,000,000 100,000 Only tiny Kalawao County showed a major change, increasing from 90 people to 716. 10,000 1,000 100 10 1 ⅛× ¼× ½× No change 2× 4× 8× Small populations were affected more by the algorithm. Some doubled in size; others were halved or even disappeared. Black people in counties 10,000,000 people in 2010 1,000,000 100,000 10,000 1,000 100 10 1 ⅛× ¼× ½× No change 2× 4× 8× Places 10,000,000 people in 2010 1,000,000 100,000 10,000 Toksook Bay 1,000 100 10 1 ⅛× ¼× ½× No change 2× 4× 8× These charts use a log scale, which zooms in on smaller populations. Black population figures include only respondents who identified as black or African-American alone. · Source: IPUMS

In Toksook Bay, the population dropped from 590 people to 540 in the test run. Mr. Pitka said that a decrease in the count due to the privacy algorithm would be “disappointing and hurtful.”

The list of uses for census data has grown since 1790, when Thomas Jefferson supervised the first enumeration. Knowing the size of small communities lets researchers track public health crises. Lawyers use counts of minority populations to ensure their vote isn’t unfairly split across voting districts. And during a natural disaster, state officials may dispatch emergency workers using maps of where the elderly live.

Getting a slice of tax revenue may be the primary concern for many local governments. The decennial census will shape the allocation of $1.5 trillion in government spending.

In Toksook Bay, federal grants helped pay for a permanent path to the nearby village of Nightmute, according to Mr. Pitka. “Now people aren’t making their own trails and tearing up the environment with their A.T.V.s.,” he said.

Some weaknesses in the privacy algorithm’s implementation are only just now coming to light. A recent analysis by Randall Akee, a professor at the University of California, Los Angeles, found that on reservations with fewer than 5,000 people, the algorithm decreased the population of Native Americans by an average of 34 percent.

Under the privacy algorithm, almost all small- and medium-size reservations showed fewer Native American inhabitants. native americans on reservations 10,000 people in 2010 1,000 100 10 1 ¼× ½× 2× 4× 8× ⅛× No change Under the privacy algorithm, almost all small- and medium-size reservations showed fewer Native American inhabitants. native americans on reservations 10,000 people in 2010 1,000 100 10 1 ⅛× ¼× ½× No change 2× 4× 8× Native American population figures include only respondents who identified as American Indian or Alaskan Native alone. · Source: IPUMS

“When a small tribe puts its own money into getting all members to participate and it gets back information that it has a population of zero, it’s certainly not going to be willing to promote the census in the future,” said Norm DeWeaver, a consultant for Native American tribes on data issues.

The census begins in January for Toksook Bay and other remote Alaskan villages so that enumerators can count residents before they leave in the spring for fishing grounds.

To size up the threat of so-called reidentification attacks, the Census Bureau tried to reverse-engineer the 2010 census results. Officials were able to correctly identify just 17 percent of the original 309 million records.

John Abowd, chief scientist at the census, thinks the risk could grow, and argues that in any case, the bureau has a legal obligation to put the algorithm to use in 2020: “We’re already under a statutory mandate to enforce confidentiality protection,” he said. “We don’t have the luxury of rolling it out after we get it perfected.”

But the stakes are too high for the census to add more errors to a survey that already misses millions of Americans. Census results are so important that some cities have even expanded their borders in advance of the count, increasing their populations to gain more federal funding. And government agencies won’t have access to the original, unmodified census counts when they distribute that money.

Census officials have already exempted state population totals from the algorithm’s effects, so congressional apportionment will remain as accurate as possible. Dr. Abowd said that the census plans to increase accuracy for the populations of some small areas, such as reservations, and that the undercount of Native Americans in the test run is “unacceptable.” There is still time to modify the algorithm — the bureau has more than a year before it releases results to the states for redistricting.

The goal of the Census Bureau is to “count everyone once, only once and in the right place.” Trudging through the snow, enumerators in rural Alaska are helping the government reach that standard. But if the bureau uses its privacy algorithm without hearing from small communities like Toksook Bay, it risks undermining their efforts and damaging the census’s reputation for decades to come.