The ability to form groups to overcome problems has been crucial for the evolution of human beings. To favour the formation of cooperating groups, one of the mechanisms developed is the inter-group bias, namely the tendency of individuals to favour members of their group and hinder the external ones. It is the cognitive equivalent of the “green beard effect” in evolutionary biology, introduced by Hamilton and popularized by Dawkins, for which a group can profit of the altruistic behaviour of its members. Here, we use a behavioural model based on the Ultimatum Game, to shed light on how this behaviour cloud has been stabilized in the human population, estimating the magnitude of favouritism needed to overcome selfish individuals. Through both numerical simulations and analytic approaches, we study how a community of collectivist and individualist agents evolves. The key factor is the mechanism for the evolution of the population, ie, the replacement of the poor-performing individuals. In the case of replacement by the reproduction of existing individuals, we observe a smooth phase transition and no coexistence. If the replacement is random, the transition smooths, and coexistence is possible. We developed analytical approaches for these two cases and performed numerical simulations. Although analytical calculations support the behaviour emerging from simulations, some differences ask for more refined treatments.