Trait ascription bias is the tendency for people to view themselves as relatively variable in terms of personality, behavior and mood while viewing others as much more predictable in their personal traits across different situations. This may be because our own internal states are much more observable and available to us than those of others.
This attributional bias has an obvious role in the formation and maintenance of stereotypes and prejudice, combined with the negativity effect.
A similar bias on the group level is called the outgroup homogeneity bias.