Logical fallacy
Ecological fallacy
A statistical relationship or average observed for groups is used to infer how the same variables relate for individuals in those groups. Aggregate data can hide variation and different individual-level relationships.
Examples
Areas with higher income vote in greater numbers. Therefore in each area the highest-income residents must vote more often.
The school with the highest average attendance has the highest average grade. This proves its most frequent individual attendees earn the highest grades.