Superiority bias
In Kruger and Dunning's experiments participants were given specific tasks (such as solving problems in logic, analyzing grammar questions, and deciding whether or not jokes were funny). They were asked to evaluate their performance on these tasks relative to the rest of the group. This gave a direct comparison of their actual and perceived performance.