How long you are expected to live, your life expectancy, is largely determined by your genetics and the lifestyle choices you make; but where you live can have positive or negative effects on your life expectancy, according to a new study.

Life expectancy is an estimate of the time a person born in a certain year can expect to live. The average life expectancy in the United States in 2019 was just under 79 years, but that does not take into consideration factors like your health, family history or lifestyle choices — or where you live.

Researchers at Penn State, West Virginia and Michigan State Universities looked at how life expectancy in 2014 changed from a 1980 baseline, using information gathered from over 3,000 counties in the U.S. Then they developed a statistical model to determine the relationship between 12 community factors that included access to health care, population growth and density, the number of fast food restaurants, access to healthy food, employment by job sector, urbanization and social capital, a measure of social cohesion between residents.

People in parts of South Dakota, Alaska, Kentucky and West Virginia and the Deep South had low life expectancies. Residents lived longer in the Northeast, and parts of Minnesota, the Dakotas and Nebraska.

After controlling for a person's basic, historical life expectancy, three community factors were found to affect reduce life expectancy, according to study author Elizabeth Dobis: the number of fast food restaurants in an area, increased population density, and the number of jobs in mining, quarrying and oil and gas extraction.

For each 10 percent increase in the number of fast food restaurants in a community, there was a 15- to 20-day decrease in life span for every person in a community, or a 50- to 200-day decrease if the number of fast food restaurants were to double.

A one percent increase in a county’s mining, quarrying, oil and gas sectors decreased citizens' average life expectancy by 15 days for men and 22 days for women.

There were factors found to be beneficial to increasing life expectancy. People living in communities with a growing population, easy access to physicians and a greater level of cohesion among residents in a community tended to live longer lives.

Living in areas with lower population density or more rural areas was associated with a higher life expectancy, suggesting that the amenities and advantages of living in large, densely-populated urban areas carries a price tag when it comes to longevity.

The differences in life expectancies among geographic areas were telling. People in parts of South Dakota had exceptionally low life expectancies; so did those in parts of Alaska. Kentucky, West Virginia and the Deep South along the Mississippi River were also areas of low life expectancy.

Higher life expectancies were found in the Northeast, in a section from Philadelphia to New England, southern Minnesota, the eastern Dakotas into Nebraska, one area in Colorado and central Idaho into the upper Rocky Mountains.

The findings are important because they suggest that changing aspects of the built environment we live in — the man-made features, structures and facilities — could add to people's life expectancy. For example, communities that are set up to encourage social interaction, such as having walk-able neighborhoods, are likely to have more social cohesion and increase life expectancy among their citizens.

The study is published in Social Science and Medicine.