Is there a term in psychology or English language to express the cognitive error in extrapolating one person's fault on the entire community?
A: Doctor A is arrested for unethical medical practices. B: All doctors are like that.
A: Teacher X works just for the money. B: No teacher is committed to their work.