In some important ways, New York City's cockroaches are eerily similar to its human inhabitants.

New research shows the insects tend to stay in the neighborhoods they grew up in and segregate themselves, much like the city's ethnic groups and income classes. And as in many a New York immigrant tale, cockroaches' ancestors likely came to America as stowaways.

"Once...