The federation, however, says that socioeconomic factors considered by insurers to set rates, such as occupation and education, are proxies for income. In its analysis, the group assigned one of the hypothetical drivers certain attributes typical of an upper-income American, including having a master’s degree and a job as a bank executive; it gave the other a high school diploma and work as a bank teller. (The “tested” drivers shared certain basic characteristics: Each was female, 30 years old, licensed for 14 years and drove a 2006 Toyota Camry 10,000 miles a year.)

The study found that quotes varied among the insurers — Allstate, Farmers, Geico, Progressive and State Farm. State Farm was the most likely to charge the good driver less, regardless of socioeconomic status, the analysis found.

Progressive and Geico, the report said, were more likely to charge upper-income bad drivers less than good drivers with moderate incomes. In Queens, for example, Progressive quoted $6,404 for the moderate-income clean driver and $3,020 for an upper-income driver with a drunken-driving conviction. Progressive declined to comment.

Geico referred a request for comment to the Insurance Information Institute, which publishes a list of criteria used to set auto rates.

James Lynch, chief actuary with the Insurance Information Institute, an industry group, said the researchers’ methodology did not necessarily reflect what actually happened in the marketplace. For instance, he said, it was difficult for someone with a drunken-driving conviction to obtain coverage at all, never mind at a rate lower than that of a safe driver.

Doug Heller, an insurance expert with the federation and an author of the study, said he agreed that it was harder for a driver with an alcohol conviction to find coverage but added that it was generally easier than it once was to get insurance with a bad driving record.

Los Angeles was the only market in which the safer but less affluent driver consistently paid less for coverage than the wealthy driver with the bad record, the study found. Mr. Heller said that was because California had strong consumer protections governing auto insurance rates. The state, for instance, explicitly bars the use of a driver’s previous insurance coverage history in setting rates, he said.