Definition for Self-serving attributions

From Biology Forums Dictionary

Self-serving attributions are when we are more likely to assign an internal attribute to our behavior when it is good and an external attribute to our behavior when it is bad.

Example: When a student is getting good grades, they assume it is because of their hard work. But when they are getting bad grades, it must be because the instructor does not like them.