A new study by AARP, the Commonwealth Fund, and the SCAN Foundation ranks the quality and affordability of nursing homes by state. It finds wide variation in both cost and quality among states but, at least according to some indicators, you get what you pay for: The states with the most affordable facilities are plagued by many poor performers.

This report, part of a much larger study called Raising Expectations, shows that for middle-income families the typical nursing home is unaffordable in every state. Across the country, the median private pay cost of a year’s stay is more than twice median income of households age 65 or older. But the differences among states are vast.

And low cost is often linked to poor quality.

For instance, the report finds that on average the most affordable facilities are in Oklahoma, the District of Columbia, Utah, Kansas, Missouri, Georgia, Texas, Iowa, Louisiana, and Arkansas.  But nearly half of those states—Oklahoma, Utah, Kansas, and Texas– rank in the bottom 10 for at least 2 of the study’s 3 quality measures. Texas and Oklahoma rank near the bottom for all three.

The story is more complicated for those states with the least affordable nursing homes. The most costly, as a share of their resident’s income, are Alaska, New York, Connecticut, Rhode Island, Pennsylvania, Massachusetts, Maine, New Hampshire, New Jersey, Vermont,  West Virginia, and Wisconsin.

New Jersey, Connecticut, and Wisconsin scored in the Top 10 on at least 2 of AARP’s 3 performance measures. Only seven of 10 scored in the Top 10 on even one.

Hawaii, which ranks #1 in all 3 quality measures, is also relatively expensive, ranking 36th in affordability. But Minnesota, which is the only other state that ranks in the Top 10 on two of the three performance measures, ranks 14th in affordability.

The report measures affordability by figuring cost as a share of seniors’ income. This is quite different from simply calculating the average cost of facilities in a given state. For that information, go to Genworth Financial’s annual cost of care survey, which you can find here.

The AARP scorecard figures the median household income of those 65-plus in each state, then uses the Genworth price data to calculate the median cost of care as a percentage of that income. (Remember, when the scorecard reports that median household income of those 65 or older is about $37,000, it means that half earn more and half make less).

To put these numbers in context, and to give you a sense of just how expensive private pay nursing facility care is, the study figured that the median annual cost of a nursing home room in the U.S. is more than twice median income.

In Oklahoma, the state where nursing home care is most affordable, a year’s care costs 168 percent of median income. In Alaska, where it is least affordable, care tops four times median income. Even if you toss out Alaska as an outlier, the median costs for the next least affordable 9 states are still triple median income.

The study uses three performance measures:  The percent of high-risk nursing home residents with pressure sores, staff turnover, and the share of long-stay residents getting anti-psychotic medicine. These powerful drugs are often overused, especially for residents with dementia.

As with so much of this report, the variation among states is revealing–and troubling. For example, on average about 6.2 percent of high-risk residents have pressure sores. In Hawaii, the rate is 3 percent while in New Jersey it is 8 percent.

Similarly, average staff turnover across the country is about 40 percent. In Hawaii it is only 15 percent. In New York, it is about 20 percent. In Texas it is 72 percent.

Same story with anti-psychotics. The national average is about 21 percent. The best states—Hawaii, Alaska, and Michigan— average below 15 percent. Facilities in Texas, Utah, and Louisiana average more than 25 percent.

Of course, this study generalizes by state. Consumers can still find a high-performing facility in a low-rated state, or stumble into a poor home in a state that ranks high in overall care.

But these averages tell an important story: Nursing home quality and affordability vary widely across states, and they only sometimes have much to do with one another.