Why should a ground squirrel give an alarm call at the sight of a hawk, which raises her chances of being eaten by the hawk? She should duck and cover, to save her own skin.
These questions long since puzzled people who study behaviour, since the trait should become rare in the genepool as these self-snack-raficing individuals are digested and turned into parts for baby hawks. In the end, there should be nothing left but the squirrels that get the heck out of dodge.
The beginning of our understanding of apparent altruism among animals came when people began understanding fitness better. The ground squirrel could be a mother, trying to save her offspring. If she can save them easier than she can produce more pups, then she should do that. Putting it mathematically, she should act when
Where B is benefit, C is cost and i is rIsk. In this case, the benefit is past reproductive success - potential grand-offspring to carry her traits into the future. The cost is how much she'll pays - all the future potential offspring she could make. And the rIsk is the probability that she'll have to pay that cost. The cost can be very high, but if the risk is low, you don't need much benefit to justify the action.
W.D. Hamilton formalized this even better, with Hamilton's rule (imaginatively named) where a trait (such as this self-snack-raficing behaviour) is expected to become more common in a population when the inequality is satisfied:
Where r is probability that the recipient of the actor has the trait. From our understanding of Mendelian genetics, this is .5 for parent-offspring, .5 for sibling-sibling pairs, .25 for half-siblings or Grandparent-Grandoffspring. There are some interesting exceptions to these rules that I'll mention in a future post.
So, in plain English, if we define all the future offspring our Ground squirrel can have as being 1, and assume 100% risk, then the other ground-squirrel she saves should be worth 2 times that many offspring if if the altruistic squirrel is a parent. Along these lines, J.B.S. Haldane was once asked if he'd give his life to save his brother. Jokingly, he replied "Would I lay down my life to save my brother? No, but I would to save two brothers or eight cousins."
Of course, there's far more to altruism than this; we call this principle `kin selection`, where evolutionary impact isn't just from one's own offspring, but from an organism's blood-family members as well. The description of kin selection went a long way to explaining how many forms of altruism we find among animals evolved.
You can find some extreme examples of this in some insects, where queens produce sterile workers. These sterile workers get all their evolutionary fitness from the queen's success, and none through their own reproduction (Because they can't). Because the cost is so low (they'll never have offspring), it doesn't take much benefit to justify extreme actions. In this system, bees with stingers evolve. They die when they use them, but they manage to advance the queen's reproductive fitness just a little more in doing so.
Interestingly, because of bees breeding system, the workers are more related to the female future-queens than the reproductive males. Because of this, the workers siphon off resources from the males larva and invest it in the female larva. There's insurrection in the beehive!