Ecological fallacy
The ecological fallacy is when you see something true about a whole group (e.g. a town, a school, a country) and assume it's true for one person in that group. Group-level statistics don't tell you about individuals. A neighbourhood might have a high average income but contain many poor residents; a school might have high average scores but many struggling pupils.
Examples
Schools with more libraries have higher test scores. So if we get a library, our test scores will go up.
Countries with more doctors have better health outcomes, so if I see more doctors I'll be healthier.
This area has low crime, so it's safe to walk here at night.