KANSAS CITY, Mo. — Consider two women in their 70s, both residents of the Kansas City area. One is white and affluent; the other is black and working class.

Guess which one is more optimistic about the country’s future and that of their grandchildren?

More than likely, you guessed wrong.

EDITOR’S NOTE — This is part of Divided America, AP’s ongoing exploration of the economic, social and political divisions in American society.

This year’s presidential campaign has underscored an economic paradox: Financially, black Americans and Hispanics are far worse off than whites, yet polls show minorities are more likely than whites to believe in the American Dream. And they are less anxious about the outcome of the election.

At 71, Carole Ramsey knows she has long been fortunate. She married a man who became a successful lawyer, raised their children in Kansas City’s affluent western suburbs and now enjoys a comfortable retirement full of international travel.

“We’ve lived a very good life,” Ramsey, who is white, said at an upscale shopping center in Leawood, Kansas. Even so, she says she’ll vote for Donald Trump because she fears economic stagnation and global terrorism. “Our kids will not be able to live the way we did, that’s for sure.”

Ethel Tuggle, 72, backs Hillary Clinton, and a big reason is that her grandchildren’s circumstances show how life has improved for her family. “They’re starting jobs at $15, $20 an hour; I’ve never seen that sort of money,” said Tuggle, who is black and worked construction for Kansas City government until injuries forced her to retire early.

Tuggle says she’s amazed at the progress she’s witnessed since her childhood in rural Missouri, when she was barred from entering shoe stores and had to trace her foot on a sheet of paper so a salesman inside could fit her for shoes. Her grandchildren live under the nation’s first black president.

One factor in the surprising gap between black optimism and white pessimism is simply partisan politics: Blacks and Hispanics are overwhelmingly Democrats and more likely to feel positive about the future when one of their own is in the White House.

“When Bush was in office, Republicans thought the country was headed in the right direction,” while Democrats did not, said Neil Newhouse, a Republican pollster. “Once Democrats took over, that flipped.”

Still, there’s evidence that the divide goes beyond party and Obama’s presidency. In great measure, it has to do with the past, not the future: Minorities who have seen great improvements in their lives are more confident, while whites who have seen disintegration in their lives are more pessimistic.

The NORC at the University of Chicago has for decades asked Americans whether they think their standard of living will improve. Since 2002 — well before Obama’s 2008 election — NORC surveys have found that whites across all parties and income levels have been steadily less likely to think their standard of living would improve. Blacks and Hispanics, meanwhile, have increasingly believed their living standards would rise.

“This is a racial and ethnic thing — not something that’s based on education, income or party,” said Jennifer Benz of NORC. “It’s whites’ huge decline in optimism that makes the gap between whites and minorities the biggest it’s been in a long time.”

In a poll conducted for the Atlantic and Aspen Institute last year, minorities were more likely than whites to agree with the statement, “The American Dream is alive and well.”

A Pew Foundation survey found that Hispanics were the least likely ethnic or racial group to be anxious about the outcome of the current presidential race — even though a centerpiece of Trump’s platform is to deport millions of immigrants living in the country illegally and restrict overall immigration.

In a June AP-NORC poll, 62 percent of blacks said they thought America’s best days were ahead. Only 40 percent of whites thought so. Fifty-three percent of blacks and 48 percent of Hispanics called the economy “good.” Just 37 percent of whites did.

The level of optimism among minorities might seem to defy economic realities. Whites have a median household income of $71,300 compared with blacks’ median of $43,300. A Pew foundation report found that white households’ typical net worth was 13 times that of black households. A separate report from the Institute for Policy Studies has calculated that, at their current rate, it would take blacks 228 years to catch up with the wealth of whites.

Still, minorities have seen progress, while whites have stalled.

According to Census data, white men have increased their income by only 3 percent since 1973, while black men have improved theirs by 12 percent. (Incomes for all women have risen sharply since they entered and rose through the workforce since the early 1970s.)

Many Hispanics have enjoyed solid income gains. The Institute for Policy Studies found that Hispanics’ household wealth has risen 69 percent over the past 30 years, albeit to a still-low $98,000 relative to whites’ $656,000.

“If you’re at the bottom moving up, you feel much better about your prospects than if you’re at the top moving down,” Democratic pollster Mark Mellman said.

There is one area where blacks, especially, register as more pessimistic than whites: Race relations and policing. Blacks particularly have polled as more negative about race relations recently, following a series of high-profile police killings of African-Americans. There is frustration, especially among younger blacks, that the incidents have continued under the nation’s first African-American president.

Yet even the usually peaceful demonstrations against those killings since 2014 could be seen as evidence of optimism, said Andra Gillespie, a political scientist at Atlanta’s Emory University.

“You wouldn’t see people taking to the streets and demanding justice if they didn’t think they had a greater chance of being able to change things,” Gillespie said.

Brandon Dixon’s father was asphyxiated by Kansas City police in 2009 during a psychotic episode. The incident shocked Dixon, who gave up his work in construction and decided to plow his family’s life’s savings into opening a restaurant in the impoverished neighborhood where he grew up.

Four years after he bought a former beauty salon to convert into an eatery, Dixon has been unable to open the restaurant because of environmental contamination from a neighboring gas station. He’s struggling financially but hopes his business will finally open in a few weeks, and that it will help turn around his life and his community.

“We’ve always seen adversity,” Dixon said. “You have to not stand still, not be stagnating, keep moving forward.”

Andrew Cherlin, a sociologist at Johns Hopkins University, noted that people tend to evaluate their own prospects based on their parents’ experiences.

“When whites look backwards, they compare themselves to a generation that was doing better,” Cherlin said. “Blacks and Hispanics,” who face less overt discrimination today, “compare themselves to a generation that was doing worse.”

As incomes have stagnated for working class whites, their rates of suicide, drug addiction and mortality have surged. Two economists in December 2015 reported that death rates have been rising since 1999 for whites between ages 45 and 54, with the sharpest increase among the least educated.

By contrast, the suicide rate for black men has dropped since 1999. And the gap between black and white life expectancy is now the lowest in more than a century: 3.4 years. More whites have died than were born since 2011, and the Census Bureau projects that whites will be in the minority by 2060.

Doug Haag lives in Milwaukee. One of the city’s dwindling number of working-class white residents, he feels that the social contract between employers and employees has broken down.

Haag, 59, doesn’t see much job security anymore. He works for the state of Wisconsin, where a recent civil service overhaul makes it easier to fire public employees. Even though he’s had a steady job the past 18 years he considers himself “lower-middle class,” unable to afford vacations or nights out with friends. He worries about whether he’ll be able to retire.

“There’s no middle class any more — the true middle class,” Haag said. “There’s no loyalty from companies any more or from the employees.”

A Trump supporter, Haag said he’s hopeful that the reality show star can restore the country’s position of strength in the world and in the economy.

“He’s going to be able to do that as a businessman,” Haag said.

Adrianne Bockhorst lives in a tonier spot than Haag — in the upscale Milwaukee suburb of Whitefish Bay. She’s a Democrat who plans to vote for Hillary Clinton. But she, too, is worried — shaken by the scars of the recession, which tossed her family into bankruptcy, and by the vitriol of the presidential campaign.

Bockhorst, who is white, tries not to even think of the country’s economic future. “I just ignore it because it scares me so much because of the collapse and what it did to us, our dreams,” she said. “I’m in total denial that something bad could happen again. We don’t have a retirement plan, we don’t have a safety net.”

Bockhorst lives worlds away from the Milwaukee streets which erupted in riots last month in the wake of the shooting of a 23-year-old black man by police after a traffic stop. Milwaukee has the fifth-worst poverty rate in the nation, based on the most recent Census data. But even there you’ll find optimism among minorities.

“We used to have slaves, you know?” said Christine Ricks, whose northside neighborhood was at the center of August’s riots. “There have been improvements. My grandfather and your grandfather used to not be able to drink out of the same fountain.”

Ricks grew up next to what Ricks calls “the biggest dope house in the entire city”; she works as a substitute teacher and has almost no money. But she’s still optimistic that her life will improve, and that Clinton will be elected.

“I think it’s going to be all right; I just don’t know how,” Ricks said. “I would describe it as complete faith in God. Literally. From moment to moment.”

Jose Estrada, 71, emigrated from Mexico to California in the 1960s. He moved to Milwaukee in 1967, became a citizen 11 years later, and retired in 2003 after working a variety of manufacturing jobs. Estrada describes himself as middle class.

“I worked very, very hard to get myself to this point,” he said.

While he supports Clinton and fears Trump would damage the country, Estrada is optimistic about America’s future regardless.

“We will be happy with anyone who gets into that position, and I will respect it,” Estrada said. “Whoever it is, I am living in this country, it is a beautiful country and I love it. I’ve got more here than I ever had in Mexico.”