SAN FRANCISCO – Curious about their roots, consumers are spending tens of millions of dollars each year getting their DNA tested and then proclaiming they are one-quarter Irish, 22 percent Scandinavian or 14 percent American Indian.

These pie charts of ethnicity make for great water-cooler conversation. But what about the science? Experts say it is still in its infancy, can reinforce stereotypes and sometimes is flat-out wrong.

Scott Woodward, a former employee of Ancestry.com who helped build the company's database of ethnic markers, said DNA services are prompting millions to ask questions about their family history. He sees that as beneficial. But he's troubled that so many consumers see ethnic analysis as a hard science, when there are well-known limitations.

"It is a very, very hard problem," said Woodward, a Utah academic who previously was Ancestry's director of genomic discovery. "People like to draw hard lines with ethnicity, and they should be fluffy clouds."

Ancestry — the industry leader, with more than 5 million people tested — marketed its DNA-testing kits by claiming it offers five times more detail about family history than competitors. Some independent evaluators have praised the company for how it presents ethnicity data and places it in historical context.

But Ancestry officials acknowledge there are large data gaps that prevent making connections between people's DNA and certain ethnic groups worldwide.

Ancestry is strong in analyzing the bulk of the U.S. population — people of European descent and African-Americans whose ancestors came across the Atlantic on slave ships, particularly from West Africa.

But the company's analysis is less strong in teasing out the ethnic background of people whose ancestors came from China or India — countries that now comprise 37 percent of the world's population.

Companies such as Ancestry, 23andMe and Helix make ethnicity estimates by comparing people's DNA to "reference populations" — people who have agreed to have their DNA tested and their family histories shared. Ancestry says it has developed a reference panel made up of 3,000 DNA samples worldwide.

After a customer submits DNA for analysis, Ancestry examines 700,000 markers in that sample and compares it to its reference panel. "Then we come up with statistically plausible distribution of where your ancestors come from," Ball said.

Ancestry built its ethnicity reference panel from a DNA database compiled by the Sorenson Molecular Genealogy Foundation, which, from 2000 to 2012, collected DNA samples from roughly 100,000 people worldwide. The goal of the foundation, launched by the late Utah billionaire James L. Sorenson, was to demonstrate how people of the world are related to each other.

Utah-based Ancestry.com acquired the database in 2012. The company now uses the data to explore ethnic differences between customers, a purpose far different from Sorenson's lofty goal.

For years, anthropologists and other critics of commercial DNA testing have warned consumers to approach these tests with a high degree of skepticism.

"They might be accurate, but it might be just as accurate to look at yourself in the mirror," said Jonathan Marks, an anthropology professor at University of North Carolina, Charlotte. "People need to realize that genomics companies are a mix of science and corporate hucksterism."

Defenders of DNA testing say it has sparked healthy conversations about heritage and has furthered family discoveries. But DNA testing, and the way it is interpreted, also may be reinforcing racial stereotypes.

"The whole idea of what is a race biologically is still pretty problematic," Woodward said. "We can take all of the humans on the earth, and we are essentially one big species. The amount of variation, the amount of uniqueness from one population to another population is pretty small compared to the overall."