Ecological fallacy occurs when researchers attribute the characteristics of a group to individuals within the group. For example, if a study finds that countries with higher rates of physical activity have lower incidences of heart disease, it would be an ecological fallacy to conclude that every individual who is physically active within those countries has a lower risk of heart disease. The fallacy arises because aggregated data mask individual variations.