They are the ‘Good Eggs’ who help run the school fete, donate to charity and volunteer to help others.

But individuals who help the community with no expectation of reward have been a riddle for scientists.

While good deeds can improve society, they can be costly for the individual in terms of time, money and effort.

Scientists discovered that people who do good deeds are heavily influenced by their genes (file picture of an elderly woman receiving a cup of tea)

And there is the problem that so-called ‘free riders’ the lazy – or greedy – benefit without doing any hard graft themselves.

But science for the first time has discovered that people who do good deeds are heavily influenced by their genes.

Scientists studying identical and non-identical twins found that genetics accounted for 41 per cent of the likelihood an individual would be ‘civically engaged’ - help in the community.

They found that genes played a 33 per cent likelihood in volunteering for community activities or public service, 28 per cent likelihood of contributing to charitable causes and 27 per cent of the time explain whether they would vote in elections.

The researchers studied 1197 pairs of identical twins – who have exactly the same genes -- and 684 pairs of non-identical twins – whose genes are less similar.

By looking at the differences between the two types of twins, they assessed what part genes have to play in their behaviour given that they were brought up in identical environments.

The authors write that the ‘results suggest that there is an underlying genetic contribution to the extent to which someone is civically enganged as well as for the individual acts of engagement, such as volunteering for community or public servce activities, regularly contributing to charitable causes and voting in national or state elections.’

Genes played a 33 per cent likelihood in volunteering for community activities (file pictures of a man being helped down the stairs)

They add: ‘Humans can and do overcome collective action problems, as evidenced by the millions of people who are civically engaged both within and outside the electoral realm. Our findings suggest that the factors that explain such engagement are not only social, but also find root in individuals’ genes and their personalities’.