I had this question posed to me yesterday. I couldn't come up with a great answer but John Piper did! Below is an excerpt from an article on racism, stereotypes, and generalizations. 
Check out the whole article here. When is a generalization about a  group racist? I am using the word racist as something sinful,  and the following answers move toward a definition. The following uses  of generalization would be wrong (racist): - When      you want  a person to fit a negative      generalization that you have formed  about a group (even if the      generalization statistically is true). 
 - When      you assume that a statistically true negative  generalization is true of a particular      person in the face  of individual      evidence to the contrary.
 - When      you  treat all the members of a group as if all must be  characterized by a negative generalization.
 - When      you  speak disparagingly of an entire group on the basis of a negative       generalization without any regard for those in the group who don’t fit  the      generalization. Or: When you speak negatively of a group based  on a      generalization without giving any evidence that you  acknowledge and      appreciate the exceptions. (I assume that Jesus’  generalizations about the      Pharisees [Matthew 23] and Paul’s  generalization about the Cretans [Titus      1:12]  are not sinful because they did have such regard and did appreciate       the exceptions.)
 
 Implication for Christians: While  realizing that life is not livable without generalizations, be careful  not to let your pride lead you to use statistical generalizations in  unloving ways.
Pastors are poor repenters. Ironic isn't it? The men who call people to geniune repentance weekly, often fail to deeply repent themselves. 
This week I had some of my personal property violated. In my anger, I formed generalizations that led to racist thoughts and complete bitterness. This wasn't towards a people group of a different ethnicity. No, it was towards a people group that are near the low end of the social and economic scale often by their own choice and actions. They need discipline, yes. And yes, I must protect my family, friends, and flock as well. 
But....
They don't need me to be racist. That is sin. I don't want to be bitter. I don't want to dishonor God or the gospel. I repent and trust the gospel. They need me to speak the gospel, live the gospel, and keep the gospel at the center of my heart and actions.