or a few animals which tend to be imitated by the rest of the members of the herd more than others. An animal taking this role is called a "control animal", since its behaviour will predict that of the herd as a whole. It cannot be assumed, however, that the control animal is deliberately taking a leadership role. Control animals are not necessarily, or even usually, those that are socially dominant
in conflict situations, though they frequently are. Group size
is an important characteristic of the social environment of gregarious species.
The reason why animals form herds can not always be stated easily, since the underlying mechanisms are diverse and complex. Understanding the social behaviour of animals and the formation of groups has been a fundamental goal in the field of sociobiology and behavioural ecology. Theoretical framework is focused on the costs and benefits associated with living in groups in terms of the fitness of each individual compared to living solitarily. Living in groups evolved independently multiple times in various taxa and can only occur if its benefits outweigh the costs within an evolutionary timescale. Thus, animals form groups whenever this increases their fitness compared to living in solitary. 
The following includes an outline about some of the major effects determining the trade-offs for living in groups.
Hunting together enables group-living predators, such as wolves and wild dogs, to catch large prey, what they are unable to achieve when hunting alone. Working together significantly improves foraging efficiency, meaning the net energy gain of each individual is increased when animals are feedi
However, some details about this concepts remain unclear. Being the first to detect predators and react accordingly can be advantageous, implying individuals may not fully be able to rely only on the group. Moreover, the competition for food can lead to the misuse of warning calls, as was observed for great tits: If food is scarce or monopolized by dominant birds, other birds (mainly subordinates) use antipredatory warning calls to induce an interruption of feeding and gain access to resources .
Another study concerning a flock of geese suggested that the benefits of lower vigilance concerned only those in central positions, due to the fact that the possibly more vulnerable individuals in the flock's periphery have a greater need to stay attentive. This implies that the decrease in overall vigilance arises simply because the geese on the edge of the flock comprise a smaller group when groups get large.
A special case of collective vigilance in groups is that of sentinels. Individuals take turn in keeping guard, while all others participate in other activities.  Thus, the strength of social bonds and trust within these groups have to be much higher than in the former cases.
Hunting together enables group-living predators, such as wolves and wild dogs, to catch large prey, what they are unable to achieve when hunting alone. Working together significantly improves foraging efficiency, meaning the net energy gain of each individual is increased when animals are feeding collectively. A group of Spinner dolphins is for instances able to force fish into a small confined space, which makes capturing prey particularly easy, as there is no way for the latter to flee. Furthermore, large groups are able to monopolize resources and defend them against solitary animals or smaller groups of the same or different species. It was shown that larger groups of lions tend to be more successful in protecting prey from hyenas than small ones.  Being able to communicate the location and type of food to other group members may increase the chance for each individual to find profitable food sources, a mechanism which is commonly known to be used by bees, which use a so called Waggle dance, and severel species birds using food calls.
In terms of Optimal foraging theory, animals always try to maximize their net energy gain when feeding, because this is positively correlated to their fitness. If their energy requirement is fixed and additional ener
In terms of Optimal foraging theory, animals always try to maximize their net energy gain when feeding, because this is positively correlated to their fitness. If their energy requirement is fixed and additional energy is not increasing fitness, they will use as little time for foraging as possible (time minimizers). If on the other hand time allocated to foraging is fixed, an animal’s gain in fitness is related to the quantity and quality of resources it feeds on (Energy maximizers). 
Since foraging may be energetically costly (searching, hunting, handling, etc.) and may induce risk of predation, animals in groups may have an advantage, since their combined effort in locating and handling food will reduce time needed to forage sufficiently. Thus, animals in groups may have shorter searching and handling times as well as an increased chance of finding (or monopolizing) highly profitable food, which makes foraging in groups beneficial for time minimizers and energy maximizers alike. 
The obvious disadvantage of foraging in groups is (scramble or direct) competition with other group members. In general, it is clear that the amount of resources available for each individual decreases with group size. If the resource availability is critical, competition within the group may get so intense, that animals no longer experience benefits from living in groups. However, only the relative importance of within- and between-group competition determines the optimal group size and ultimately the decision of each individual whether or not to stay in the group. 
Since animals in groups stay in close proximity to each other and interact frequently, infectious diseases and parasites spread much easier between them compared to solitary living animals. Studies have shown a positive relationship between herd size and intensity of infections, but the extend to which this sometimes drastic reduce in fitness governs group size and structure is still unclear.
However, some animals have found counter mechanisms such as the use of Propolis in bee hives or grooming in social animals.
Staying together in groups often brings energetic advantages. Birds flying together in a flock use aerodynamic effects to reduce energetic costs, e.g. by positioning themselves in a V shaped formation . A similar effect can be observed for fishes swimming together in fixed formations.
Another benefit of group living occurs when climate is harsh and cold: By staying close together animals experience better thermoregulation, because their overall surface to volume ratio is reduced. Consequently, maintaining adequate body temperatures becomes less energetically costly. 
The collective force of a group mobbing predators can reduce risk of predation significantly. Flocks of raven are able to actively defend themselves against eagles and baboons collectively mob lions, which is impossible for individuals alone. This behaviour may be based on reciprocal altruism, meaning animals are more likely to help each other if their conspecifics did so earlier. 
Animals living in groups are more likely to find
Animals living in groups are more likely to find mates than those living in solitary and are also able to compare potential partners in order to optimize genetic quality for their offspring. 
The term herd is also applied metaphorically to human beings in social psychology, with the concept of herd behaviour. However both the term and concepts that underlie its use are controversial.
The term has acquired a semi-technical usage in behavioral finance to describe the largest group of market investors or market speculators who tend to "move with the market", or "follow the general market trend". This is at least a plausible example of genuine herding, though according to some researchers it results from rational decisions through processes such as The term herd is also applied metaphorically to human beings in social psychology, with the concept of herd behaviour. However both the term and concepts that underlie its use are controversial.
The term has acquired a semi-technical usage in behavioral finance to describe the largest group of market investors or market behavioral finance to describe the largest group of market investors or market speculators who tend to "move with the market", or "follow the general market trend". This is at least a plausible example of genuine herding, though according to some researchers it results from rational decisions through processes such as information cascade and rational expectations. Other researchers, however, ascribe it to non-rational process such as mimicry, fear and greed contagion. "Contrarians" or contrarian investors are those who deliberately choose to invest or speculate counter to the "herd".