  The problem of free-riding arises when individuals benefit from a shared
resource, service, or public good without contributing proportionately to its
provision. This conduct often leads to a collective action problem, as
individuals pursue personal gains while relying on the contributions of others.
In this study, we present a Bayesian inference model to elucidate the behaviour
of participants in a Public Goods Game, a conceptual framework that captures
the essence of the free-riding problem. Here, individuals possess information
on the distribution of group donations to the public good. Our model is
grounded in the premise that individuals strive to harmonise their actions with
the group's donation patterns. Our model is able to replicate behavioural
patterns that resemble those observed in experiments with midsized groups (100
people), but fails to replicate those for larger scales (1000 people). Our
results suggest that, in these scenarios, humans prefer imitation and
convergence behaviours over profit optimisation. These insights contribute to
understanding how cooperation is achieved through alignment with group
behaviour.
