The (a) average and (b) standard deviation of happiness of a community as a function of its size. Each point represents a single community. The green points represent communities detected by a modularity maximizing algorithm applied on the constructed communication network, while the red points represent random communities. The blue points in (b) represent the difference between the values of respective green and red points. The detected communities have lower standard deviation than the random communities, which suggests some evidence for homophily. Moreover, as the size of community increases, the average happiness decreases and the standard deviation of happiness increases. However, random communities show a similar pattern of increase in standard deviation. This suggests that the increase in standard deviation is mostly not due to decrease in homophily. As the blue line shows, the standard deviation only slightly increases as the size of the community increases. Note that only cells within top/bottom 15% of happiness are considered. The use of other percentiles produces similar plots (check Section G of Additional file 1).