In a world of survival of the fittest, it makes sense that animals are hard-wired with a basic instinct that has them making snap judgments about their predators.
Some chimpanzees attack chimps that are of the same species, but not a part of their group. And some fish attack their own kind simply because they weren't hatched in the same lake.
But what about human beings?
Psychologists say we categorize -- or stereotype -- by age and race and gender, because our brains are wired to do so automatically.
"When you're a social animal, you need to be able to distinguish who's a friend and who's a foe. You need to understand who's a member of your pack, who's a member of a different pack," said John Dovidio, a professor of psychology at the University of Connecticut.
According to Dovidio, even those of us who believe that we don't stereotype, do. "We categorize people automatically, unconsciously, immediately, based on a person's race and based on a person's sex."
It begins in childhood. "20/20" brought together three groups of kids and showed them pictures of two men -- one Arab, the other Asian.
When we asked the children which man they liked better, over and over, more kids said they preferred "the Chinese guy."
One child preferred the Chinese man "because he looks nicer and he has a smile on." But both men were smiling.
Several children weighed in on the Arab man's personality, basing their opinions on just seeing his picture. One child said, "I think he's weird." Another child said, "He's like the scary dude."
Next, "20/20" showed the kids pictures of a black man and white man. This time the pictures were different. Here were some of the comments the kids made about the photo of the black man.
One said, "He looks mean." Another referred to him as "FBI's Most Wanted." Another commented, "He looks like he's a basketball player."
When the white man's picture was shown, one child said, "He's nice." Another said, "I think he's nice except he might be mad about something."
The boy was probably picking up on something. The photo of a white man was of Oklahoma City bomber Timothy McVeigh. Admittedly, the pictures were a little bit different, but when we asked which man is a criminal, most kids pointed to the black man. When we asked which man was a teacher, most pointed to McVeigh. This is ironic because the black man pictured was Harvard University professor Roland Fryer.
Most adults claim they don't have these biases, but psychologists who study stereotypes say they do.
Harvard University's Implicit Association Test is supposed to measure racial bias. The test flashes pictures of white and black faces and words like "evil" and "nasty," plus words like "joy" and "wonderful," and evaluates whether people associate different words with certain races.
The test is given quickly, so that test-takers don't have time to think consciously.
The test's designers say it can show whether or not you have a preference for anything -- skirts versus pants, Meg Ryan versus Julia Roberts.
"20/20" invited a group of Pace University students to take the test. They said they preferred Julia Roberts, and the test showed they did.