That's not the same process: assigning a trait to someone because they're from a certain group with no evidence is prejudice.
If members of a group repeatedly display similar traits, be they positive or negative, then they'll get a reputation over time.
How fair that is can be debated, but we can't just dismiss this form of learning. For example, much as I hate to admit it, many people on bicycles in Tübingen ride on pavements and through pedestrian areas, and get exceptionally stroppy when people don't leap out of the way, so people tend to associate that with everyone on bikes. It's unfair but not without evidence.
On a similar note
occaisionally a bunch of gypsys turn up near here and set themselves up on the local park
first time they did this people were up in arms and everytone was locking their kids up and expacting the park to be destroyed
The leader of the group was contacted by a journalist from the local paper
and he said they were between gypsy gatherings and would be gone on a few days - he gave a date
and they never leave a mess behind
they left when they said
and a local authority person who took a team down to start the clear up said he had to send his lads out up all the local path litter picking because the gypsies have not only left nothing behind except some neatly stacked bin bags by arrangement
but they had also litter picked the whole field they were on
the place was tidier when they left than when they arrived
they have done this about 3 or 4 times now and been the same every time
Ok - the counsel have put bollards to stop them getting on which have magically been pulled out
but they do show that not all "travellers" are the same