A group has a better chance against a predator than does an animal alone. The group can take concerted evasive action, scatter, confuse the predator, or even gang attack.
Groups are more conspicuous to predators, but individual risk is lessened. Cohesive groups respond to each other and provide better protection against predators, even if only by having more alert individuals nearby.
Solitary red-billed weaverbirds, or when congregated with other bird species, often fail to respond to a predatory goshawk flying overhead. When 2 or more weaverbirds are together, a hawk is much more likely to be seen and a response made.
Colonial nesting birds are known to form a formidable opposition. A fox coming into a group of nesting gulls is likely to be mobbed, to the point of the birds kicking the fox with their feet. A solitary bird has no such hope of intimidation.
Birds of prey rarely attack a close group. The most common stratagem is to make threatening swoops to try to get the group to scatter, so that the predator can single out an isolated individual.
Behavioral geometry favors close grouping. If each animal in a group tries to put one animal between itself and a predator, then a tight formation results.
Beside adding a margin of safety, protective grouping affords members more time for foraging and feeding, requiring less individual vigilance.
Protective grouping raises the issue of cheating: whether an individual can ride on the attentiveness of others. Slackers are more likely to be caught out as response time to danger slows.
A feeding-focused cheat is likely worse off than one that occasionally looks around. Hence, intermittent vigilance benefits both the individual and the group.