If tomorrow a horrific terrorist attack from white Caucasians would take place, we would not suddenly get nervous with every white Caucasian sitting next to us in our plane. Perhaps the somewhat obvious reason could be that while we tend to ignore all the peaceful muslims in our society, we do have one important counter example to the hypothesis that all Caucasians are terrorists: ourself. Any viable hypothesis should not implicate ourself, so you start looking for more subtle attributes: does the person look like a slob? Or perhaps do they grow long hair etc.?
Our tendency to overgeneralize directly causes us to discriminate. Studies reveal that we (white people) are more afraid to be mugged by black people than by white people, even though we think we do not think so ourselves! In machine learning we call this "underfitting". Our theories about the world are too simple, our prediction about the world are poor and we draw conclusions too fast.
What can we do about this? Firstly, being aware of these inborn tendencies can help, at least at a conscious level. But it's not enough. My recommendation: build appreciation of other cultures by organizing multi-cultural parties in your community. Experience many positive counter examples to counteract your prejudices. Don't let those unfounded hypotheses based on a single negative example cloud your judgement.