Another indication that discrimination was at play: Workers’ job quality was worse when they had a direct supervisor of a different race. Eighty percent of white workers said their managers were white, while 38 percent of nonwhite workers had a manager of the same race. The results were based on a subset of 20,400 survey respondents from 81 of the nation’s largest retail and food service companies.

The researchers used a novel technique to find survey takers: They placed ads on Facebook. The full sample is of workers at 120 of the largest retail and food service companies in the United States, industries that employ one-fifth of American workers. It is not a random sample, but they said it is reflective of the retail and food service work force. It is much larger than any other survey of this group of workers and provides more fine-grained data. Social scientists not involved in the research said it was carefully done and convincing.

Two-thirds of workers said they received less than two weeks’ notice of their schedules, and 15 percent had less than 72 hours of notice. Eighty percent said they had little or no input into their schedules. A third said they wanted more hours than they were assigned.

Not knowing when they will work worsens the challenges of people living on a low income, the survey found.

Over all, hourly workers described going hungry, not being able to pay bills, scrambling to arrange child care, losing housing, losing sleep and feeling stressed and unhealthy. But those with unpredictable schedules were twice as likely to report hardships as those with stable schedules — even when they earned the same wages, worked the same number of hours and had the same employers.

“They expect you to always say yes,” said Brandy Powell, 38, a single mother of five in Fontana, Calif., who has spent almost all her working life in hourly retail jobs.