To be social, or to be stinky — that is the question. At least it is for Ted Stankowich.

Stankowich studies the interactions between animal predators and their prey at California State University. Much of his work focuses on figuring out the evolutionary and ecological factors behind the ways different animals defend themselves, and why certain defense mechanisms evolved in some species, but not others.

Just as you'd never bring a knife to a gunfight, animals use the right tools for the right job. Take skunks and meerkats, for example. At first glance, they don't seem all that different. They're both small members of the order Carnivora. They both eat insects, lizards, frogs, smaller mammals, and fungi. They're both kind of cute if you look at them the right way.

But they also live in different parts of the world in different habitats. They have different schedules, and hunt, sleep, and rear their offspring in different ways. Their lifestyles put them up against different predators with different hunting styles, which demand different defenses: Skunks blast predators with a noxious spray from their anal glands, while meerkats find safety in numbers, living in large groups that allow them to look out for each other and overwhelm predators that would be too big to fight off alone.

In his latest study, Stankowich and biologist Tim Caro from the University of California, Davis, collected data on 181 carnivoran species, and analyzed the risk that other mammals and birds of prey pose to them as predators. Then they tested all of these factors against the species' spraying and social behavior, if any, to see what drove these defense mechanisms.

They found defense mechanisms were most influenced by the times when the animals are active and by the types of predators that hunted them. Skunk-like sprays and other stinky gland secretions were favored by animals that are nocturnal and most threatened by mammalian predators on the ground. If an animal can't see very far, a close-range defense comes in handy if it's surprised by a predator.

Social defenses, meanwhile, were most frequently found in animals that are active during the day and that are prey for birds. This strategy puts more eyes on the sky and makes it easier to spot a predator and warn the group.

The stinky/social study builds on Stankowich's work from the last few years, connecting the various weapons and defenses that mammals employ to their behaviors, physical traits, and relationships with other animals. Here's what else he's come up with:

Horns: With many types of cattle, antelope, and deer, only the males have horns or antlers, which they use to compete against each other for females. In some species, though, the females also sport headgear even though they don't use them for reproductive purposes. Stankowich found that species that were larger and more visible to predators, and lived in more open areas with fewer places to hide, were also more likely to sport horns to defend themselves against predators.

Fur patterns: In another study, Stankowich found strong correlations between open, exposed habitats and fur patterns with bold stripes. When hiding places and escape routes are limited, the animals' coloration serves as a warning to predators to stay away. Animals with long stripes leading to their tail, like skunks, tend to be able to spray their stinky secretions accurately, while fierce biters like badgers usually sport stripes or other patterns on their face — in both cases, the patterns advertise and draw attention to the animal's weaponry.

Quills: In a review of mammal defenses, Stankowich noted that spines and quills, like those on hedgehogs and porcupines, are frequently found on small or medium-sized nocturnal animals that have to deal with large, ground-dwelling mammalian predators. He thinks that these spiky defenses are an adaptation to foes that lack hard, probing tools like beaks to get around them.

Armor: The review study also pointed out a connection between exposed environments, risk of predation from birds, and thick plate armor. For armadillos and pangolins, the plates are like a bird-proof suit, keeping stabbing beaks and talons from finding soft flesh and making the animals too cumbersome and heavy to grasp and fly away with.