Significance Changes in social diversity constitute a key factor shaping today’s world, yet scholarly work about the consequences of diversity has been marked by a critical lack of consensus. To address this concern, we propose a multidisciplinary approach where psychological, sociological, and evolutionary perspectives are integrated to provide an account of how individuals adapt to changes in social diversity. With an analysis of 22 y of worldwide data, our results suggest that humans are initially inclined to react negatively to threats to homogeneity, but that these negative effects are compensated in the long term by the beneficial effects of intergroup contact. Our findings advance knowledge and inform political debate about one of the defining challenges of modern societies.

Abstract Humans have evolved cognitive processes favoring homogeneity, stability, and structure. These processes are, however, incompatible with a socially diverse world, raising wide academic and political concern about the future of modern societies. With data comprising 22 y of religious diversity worldwide, we show across multiple surveys that humans are inclined to react negatively to threats to homogeneity (i.e., changes in diversity are associated with lower self-reported quality of life, explained by a decrease in trust in others) in the short term. However, these negative outcomes are compensated in the long term by the beneficial influence of intergroup contact, which alleviates initial negative influences. This research advances knowledge that can foster peaceful coexistence in a new era defined by globalization and a socially diverse future.

Global modernization has dramatically changed the demographic composition of most countries (1⇓–3). Societies are in constant flux and current levels of intercultural exchange are transforming social ecosystems (4). Pessimistic appraisals about the potential effects of these changes have dominated recent and critical geopolitical events (e.g., the election of Donald Trump as president in the United States, Brexit in the United Kingdom, and the refugee crisis globally), but it is not yet known how living in a socially diverse world affects the quality of people’s lives.

Models of human evolution applied to social diversity (1) support the notion that adaptation to a socially diverse context may be problematic and lead to negative outcomes. According to these models, the human brain evolved to sustain motivated cognition and behavior relevant to ingroup survival and cooperation, and to defend against potential threats from unknown outgroups (5). Humans are predisposed to distinguish ingroups from outgroups and this dichotomy is adaptive given that survival is contingent upon cooperation and reciprocity from other ingroup members (6, 7). Perhaps to facilitate this dichotomization, humans have evolved a preference for homogeneity and stability (8), as well as being with similar others (9). Moreover, outgroups are approached with a degree of uncertainty (10), as unknown others could be friends or foes, and caution in new encounters could dictate one’s survival. This reasoning is substantiated by influential work in the social sciences showing that interpersonal trust and social cohesion are lower in ethnically heterogeneous communities (11⇓–13). Subsequent work across multiple disciplines expanded on these findings by revealing that social diversity is associated with conflict (14) and may have negative implications for economic growth (15) and public goods provision (16). The mechanism hypothesized to underlie these outcomes is that diversity erodes social cohesion and trust in others (17). Meta-analyses in the field of psychology substantiate this reasoning by demonstrating that, at least initially, intergroup interactions can exacerbate intergroup bias, producing heightened stress, anxiety, and outgroup avoidance (18).

Nonetheless, negative effects of diversity on trust have been contested by recent literature reviews (19, 20) and, despite the foregoing predispositions, it is known that the extension of cooperation to outgroups is hardly rare. Research on xenophilia (21) recognizes that humans share an impulse to engage in contact with other people, even those in outgroups. Indeed, biological and cultural anthropology contend that humans have evolved and fared better than other species because contact with outgroups brings a variety of benefits that cannot be attained by intragroup interactions. There is, for example, a biological advantage to gaining genetic variability through new mating opportunities (22) and intergroup contact allows individuals access to more diverse resources and knowledge (23). Archaeological and ethnographic evidence thus suggests that the benefits of trust and collaboration largely outweigh the potential costs of intergroup conflict, contributing to the proliferation of group-beneficial behaviors over time (5, 24). Indeed, research has demonstrated through a large body of work and meta-analyses that contact with outgroups reliably improves intergroup relations (25, 26). Studies indicate that diverse contexts create greater opportunities for intergroup contact, which in turn promotes trust and social cohesion (27).

On balance, although a strong motivation for homophilous affiliation may be critical for within-group vitality and collaboration, it is more suited to the monocultural composition of ancestral social structures and less compatible with the social diversity typical of modern societies. We argue, however, that this incompatibility will dissipate over time given that, as societies become more diverse, individuals steadily reorient themselves by adopting outgroup-focused cognition and behaviors (1). Within this framework, we examine how both negative (i.e., reduced trust stemming from diversity) and positive (i.e., increased trust through intergroup contact) effects operate to push or pull outcomes in either direction.

Using worldwide data, we explore how these processes unfold in the context of growing religious diversity. Changes in religious diversity are shaping today’s world and provide a powerful context relevant to the aims of our study. People with different religious beliefs often have distinct norms, values, and worldviews that are the product of centuries of cultural evolution and cannot be easily changed or negotiated. Religion has historically been one of the strongest forces of human division, motivating expressions of intergroup hostility and outright warfare (28). Religion has most recently been at the forefront of public debate and political violence ranging from major attacks such as September 11, 2001 in the United States to smaller but still deadly incidents in multiple European countries (e.g., the United Kingdom, France, and Spain). Today, religious diversity is of paramount relevance to societies as faith-based conflict is increasing around the globe (29). In addition, religious categories offer the advantage of having clearer boundaries and definitions that are more consistent across countries (compared with ethnic or linguistic diversity). For these reasons, this form of diversity is often a stronger predictor of societal outcomes compared with ethnic and linguistic diversity (30).

Drawing on representative national surveys, we assess how religious diversity affects perceptions of the quality of life, a robust indicator that allows us to disentangle the multiple positive and negative effects of diversity on individual well-being. We hypothesize that changes in religious diversity in the short term are associated with lower trust in others and a poorer quality of life, but that, with time, intergroup contact emerges to counteract these initial negative outcomes, leading to an improved perceived quality of life.

Main Analysis Our data come from multiple waves of the World Values Survey (WVS), the European Social Survey (ESS), and the Latinobarómetro (LB), each of which contains comparable measures of happiness, life satisfaction, and self-reported health that we combined to form a quality of life index. These datasets together allow an analysis of more than 100 countries and 20 y of data, constituting one of the largest diversity studies to date. We measure religious diversity for each country and year using the Herfindahl index (31), which indicates the probability that two randomly chosen individuals belong to different groups (Fig. 1). To test our hypotheses, we follow a multilevel procedure for analyzing cross-sectional time-series data. For each survey we fitted an identical three-level multilevel model (Eq. 1) in which respondents (i) were nested within years (t), which, in turn, were nested within countries (j). Religious diversity was considered as a characteristic of specific country-years indexed as tj. With this model specification it is possible to test a cross-sectional effect by calculating the mean of x tj across all available years for each country. To capture the effect of change within each country, we subtracted x j from x tj , which yields a longitudinal component x tjM that is group-mean-centered and orthogonal to x j (32, 33). With such specification it is possible to disaggregate religious diversity into a between-country coefficient (time-invariant) and a within-country coefficient (time-variant). Following other research examining contextual effects on well-being (34), we use the within-country change coefficient to measure the short-term effects of increasing diversity and the between-country cross-sectional coefficient to assess the long-term effects of diversity. We estimated random intercepts: y itj = β 0 + β 1 x itj + β 2 x t j M + β 3 x ¯ j + β 4 t i m e t j + u j + u t j + e i t j . [1]To create our quality-of-life measure, we computed our multilevel model within a structural equation modeling framework. With this technique, we estimated, at the individual level, the effects of all controls on life satisfaction, happiness, and self-reported health. We then used these three quality-of-life indicators to compose a quality-of-life latent variable that was incorporated at higher analytical levels. This technique permitted modeling individual unobserved heterogeneity due to omitted variables that could be correlated with changes in key variables over time (35). Fig. 1. Religious diversity in the WVS (1990–2012), ESS (2002–2010), and LB (2004–2007). The dots indicate average levels of diversity across all waves of each survey (0 indicates complete homogeneity, 1 complete diversity), and error bars represent lowest and highest diversity scores in each country. As controls, in all surveys we include a range of pertinent individual (e.g., education and religious affiliation) and contextual (e.g., country wealth and economic inequality) variables. To achieve an exact replication across surveys, only variables present in all datasets were included (for further details about the surveys, control variables, and modeling technique see SI Appendix). Available data from the WVS (68 countries, 142 country-years from 1981 through 2014, and 160,645 respondents) reveal that after 1995 there were short-term fluctuations in religious diversity around the world until 2000. Thereafter diversity increased every year and then peaked in 2004. In contrast, average quality of life followed the opposite trend, moving downward to reach its lowest score in the same year (Fig. 2). Whereas a short-term perspective focusing on the period between 2000 and 2004 might suggest a correlation between both variables, if we examine the full length of data represented there is no clear association between religious diversity and quality of life—a distinction between short- and long-term effects that we substantiated through our multilevel analysis. Results show that within-country changes in religious diversity are negatively associated with self-reported quality of life (b = −0.393, SE = 0.178, P = 0.027; Fig. 3A), while the slope for between-country differences in religious diversity is not statistically different from zero (b = 0.006, SE = 0.077, P = 0.938). Fig. 2. Changes in religious diversity and average quality of life across time in 68 countries (1995–2012) in the WVS. Both variables are centered. Quality-of-life scores were adjusted for individual and country level controls (SI Appendix). Fig. 3. The effect of changes in religious diversity on quality of life in the WVS (A), ESS (B), and LB (C). The plotted values are the deviations of each country’s religious diversity in a given year from its average value. Quality-of-life scores were centered to the grand mean and adjusted for both individual and contextual controls. Analysis of the ESS (27 countries, 70 country-years from 2002 to 2014, and 126,634 respondents) replicates the foregoing results, finding that within-country changes in religious diversity are negatively associated with quality of life (b = −1.072, SE = 0.412, P = 0.009; Fig. 3B), with between-country differences in religious diversity having no significant influence (b = −0.109, SE = 0.114, P = 0.336). Analysis with the LB (18 countries, 71 country-years from 1997 to 2015, and 51,401 respondents) also yields a negative association between within-country changes in religious diversity and quality of life (b = −1.473, SE = 0.634, P = 0.020; Fig. 3C) and a nonsignificant association for between-country differences in religious diversity (b = 0.294, SE = 0.518, P = 0.571). For detailed results with all surveys see SI Appendix, Tables S4, S5, and S6. In the three surveys, the influence of within-country changes on quality of life differs from that of between-country changes (WVS: b = 0.399, SE = 0.180, P = 0.027; ESS: b = 0.964, SE = 0.483, P = 0.046; LB: b = 1.767, SE = 0.840, P = 0.035). We considered alternative controls and measures for the three surveys and these results always persisted (SI Appendix).

Mediation Analysis To test in further detail the mechanisms by which religious diversity relates to quality of life and how these processes evolve over time, we include trust and intergroup contact measures as mediating variables. These indicators were present only in wave 7 of the ESS, which also contained a wide range of measures (e.g., citizenship and household details) that we controlled at the individual level in addition to controls used in our previous analysis (for details see SI Appendix). To analyze effects of change with just one wave of data, we used the religious diversity data from our main analysis with a different model specification (Eq. 2). In this multilevel model, individual respondents (indexed i) were nested within countries (indexed j), with each country having a random intercept (or group-level disturbance) u j : y ij = β 0 + β 1 x i j + β 2 x j + u j + e i j . [2]We estimated this model twice. First, we fitted a multilevel model that estimated short-term change by examining a 2-y period (the shortest possible gap in this survey). In this analysis, we calculated the difference between religious diversity from wave 6 (2012) to wave 7 (2014), controlling for levels of religious diversity at wave 6. Second, with the same procedure, we estimated longer-term change by examining a 12-y period (the widest possible gap in this survey series). We calculated the difference between religious diversity indices in wave 1 (2002) and wave 7 (2014), controlling for levels of religious diversity at wave 1. As in our main analysis, we used structural equation modeling to create latent variables for trust and intergroup contact at the contextual level using individual-level data. These variables are essential for testing indirect effects between religious diversity and quality of life. With this approach, we tested an indirect effect via trust, which is the product of the direct effects (a) and (a′) (Fig. 4). It reflects how much of the association between changes in religious diversity and quality of life is explained by trust. The indirect effect via intergroup contact is the product of the direct effects (b) and (b′), indicating how much the association between changes in religious diversity and quality of life is explained by intergroup contact. Drawing on the contact hypothesis (25), we tested the possibility that the increased intergroup contact emerging with diversity could increase trust and, in turn, have a positive impact on quality of life. This was calculated by the product of the direct effects (b), (d), and (a′). To understand whether intergroup contact could fully counteract the negative effect via trust, we examined a total indirect effect calculated by the sum of all three indirect effects. Fig. 4. Multilevel mediation model testing the short-term (A) and long-term (B) effects of changes of diversity on quality of life, mediated by intergroup contact and trust. All coefficients are unstandardized and adjusted for individual and contextual controls. Letters within parentheses illustrate the paths used in our indirect effects analysis. Our analysis of changes in religious diversity over a 2-y period (21 countries, 33,719 respondents) indicates that the indirect effect through trust was a significant mediator (indirect effect = −0.496, SE = 0.129, P < 0.001). There were, however, no effects of religious diversity on intergroup contact (Fig. 4A), and the total indirect effect of religious diversity on quality of life is negative; indirect effect = −0.395, SE = 0.165, P = 0.016. The lower levels of trust associated with short-term changes explain the negative effects of diversity on quality of life. Our second model, examining a longer-term effect replicates the mediation via trust and reveals an additional mediation via intergroup contact (indirect effects = −0.126, SE = 0.050, P = 0.013 and 0.045, SE = 0.013, P = 0.001, respectively; Fig. 4B). An analysis testing whether contact with outgroup members improved levels of trust confirms that part of the positive effect of diversity on quality of life is due to intergroup contact improving trust (indirect effect = 0.007, SE = 0.002, P = 0.003). An analysis of the total indirect effect yields a null result, confirming that religious diversity no longer has a significant negative effect on quality of life (indirect effect = −0.073, SE = 0.055, P = 0.183). We find a null result of the direct effect of religious diversity on quality of life (b = 0.536, SE = 0.279, P = 0.054) and a null result of the total effect, comprising the direct effect and all indirect effects (b = 0.464, SE = 0.314, P = 0.140). With a 12-y gap analysis, trust and intergroup contact emerge as two opposing mechanisms (i.e., negative and positive, respectively) by which religious diversity relates to quality of life. Although reduced trust exerts a negative effect, the positive valence of increasing intergroup contact mitigates initial negative effects of religious diversity on quality of life (for a full description of the mediation models, fit indices, and coefficients see SI Appendix, Fig. S1 and Table S8). We considered alternative explanations and undertook additional analysis to account for gaps between wave 7 and all remaining waves, and all results supported our argument and findings (SI Appendix).

Discussion The foregoing analyses offer one of the richest and most extensive studies of religious diversity completed to date, not only in terms of the wide range of countries and contexts included but also because of its empirical depth in examining the mechanisms underlying the complex effects of religious diversity. Our findings are consistent across a wide range of countries and independently collected datasets. Results support models of human evolution in showing evidence of how both tendencies for ingroup association and outgroup orientation unfold in today’s context of unprecedented demographic changes. These findings provide for some evidence-based optimism in showing that, despite initial resistance, human beings can cope with the challenges posed by religious diversity. This optimism is perhaps less likely to be shared among citizens starting to experience these changes and their initial negative effects. Although some pessimism would eventually dissipate as individuals start benefiting from intergroup contact, it is important to note that the intervention of political leaders during a stage of profound change can modify the processes discussed in our findings. In contexts of change, antiimmigration narratives will be particularly powerful given that they will trigger some of the most basic human instincts such as those of ingroup protection and survival. At the same time, compared with these immediate negative effects, the positive outcomes occur at a slower pace and are more difficult to observe. These factors together can create a favorable context for the rise of nationalism, protectionism, and opposition to immigration, which politicians all too often instigate to mobilize political support. A topic that deserves further discussion is the timeframe involved in the processes revealed in our findings. In additional analysis in SI Appendix, we show that negative effects of religious diversity dissipate after an 8-y period in the ESS (SI Appendix, Fig. S4), while in the WVS and LB they require 6- and 4-y periods to dissipate (SI Appendix, Fig. S2 and Fig. S3, respectively). This variation could be due to a wealth of contextual factors affecting the mechanisms by which religious diversity influences quality of life. One factor could be, for example, the existence of favorable integration policies for immigrants, allowing newcomers to blend more smoothly into host societies. A successful integration of new religious groups should facilitate intergroup contact that, as we show, is critical for attenuating negative effects of social diversity. Other potential contextual factors include barriers to intergroup contact such as the presence of strong religious conflict or discrimination against specific religious groups, which would reduce opportunities for mixing and thereby slow down the positive path that mitigates initial reactions to diversity. Compared with other world regions, Europe contains a greater number of religiously homogeneous countries (Fig. 1). The slower timeframe at which the negative effects of religious diversity are counteracted in the ESS might be due to homogeneous societies needing more time to cope with these demographic changes, compared with diverse societies that are also changing, but that already contain some intergroup contact networks. We acknowledge the limitations of our research in testing the mediating role of intergroup contact. Although our mediation analysis referred to the “direct” and “indirect” effects of religious diversity, which is conventional language for this type of analyses, we emphasize that the underlying data ultimately consist of cross-sectional surveys, ruling out causal inferences about the underlying associations. However, tests of alternative causal relations provide some additional support to our hypothesized direction of causality (for these tests and a more detailed discussion about causality see SI Appendix). In addition, the only measure available in the ESS assessed the frequency of contact with people of a different racial or ethnic background, not different religious affiliations. This limitation is somewhat mitigated, however, given that religion and ethnicity are deeply connected (36). This is noticeable in the European context of the ESS where, in most countries, majority ethnic groups are associated with a majority religion and people affiliated with other religions tend to be immigrants and individuals of a different ethnic/racial background. For this reason, increasing religious diversity should be associated with more opportunities for contact with both other religious groups and other ethnic/racial groups. This reasoning is consistent with our data, which indicate that increasing religious diversity is, in the long term, associated with individuals having more contact with others of a different ethnic/racial background. Religious diversity is on the increase all around the world and presents one of the defining challenges of modern societies (37). Although humans can cope with these changes in the longer term, faith-based conflict is increasing around the globe (29). Apart from the influence of the demographic changes examined in our research, there are key historical and contextual factors motivating religious conflict in specific parts of the world. Examining these areas of conflict and the associated contextual characteristics could shed light on the factors that might disrupt an apparent benign human ability to cope with these challenges. Our findings and their implications should enlighten ill-informed political debates, which have often promoted hostility not kindness, violence not respect, and conflict rather than peace.

Materials and Methods In both main and mediation analyses we used measures of religious diversity and quality of life. For the mediation analysis we added generalized trust and intergroup contact measures. Tests of the metric quality of our measures are reported in additional analyses in SI Appendix. Religious Diversity. Although researchers have used several measures of diversity (for a review see ref. 38), here we used the Herfindahl index [3], which is also known as the fractionalization index. We chose this index because it is the most popular measure of diversity for comparative research (39) and allows us to compare our results directly with scholarship in the field. For each country at every point in time, religious diversity was calculated as follows: H = 1 − ∑ i = 1 n s i j 2 , [3] where S i is the proportion of people who profess religion i in country j. This index ranges between 0 and 1, indicating the probability that two randomly selected individuals in a country belong to different religious groups. The index increases with both the number of religious groups and the evenness of the distribution of individuals across groups. The proportion of different social groups is typically estimated using sources such as the Encyclopedia Britannica and the Atlas Naradov Mira from the 1960s (39). Although this method has been found to be appropriate for cross-sectional analysis, in our study it creates two problems. The first is that diversity measures based on these data sources are outdated and do not match the contextual reality of people responding to the surveys in recent survey waves. The second issue is that it does not allow us to assess religious diversity consistently across different waves to examine effects of change. To overcome these problems, we estimated the proportion of individuals in each religious group using respondents’ own reports to survey interviewers. Given that all samples are representative and statistical weights are provided to adjust for sampling error, the proportion of individuals per religious group in these datasets provides an accurate and reliable estimate of their relative numbers in society. In the WVS, data on religious affiliation were obtained from responses to the question, “Do you belong to a religion or religious denomination? If yes, which one?” The options provided were Buddhist, Evangelical, Hindu, Jewish, Muslim, Orthodox, Protestant, Roman Catholic, and Other. In the ESS, respondents were asked, “Do you consider yourself as belonging to any particular religion or denomination?” and responses included Roman Catholic, Protestant, Eastern Orthodox, Other Christian denomination, Jewish, Islamic, Eastern religions, and Other Non-Christian religion. The LB asked, “What is your religion?” and responses included Catholic, Evangelical without specifications, Evangelic Baptist, Evangelic Methodist, Evangelic Pentecostal, Adventist, Jehovah Witness, Mormon, Jewish, Protestant, Afro-American Cult, Spiritist, Christian, and Other (the survey also included Muslim, Orthodox, and Buddhist as options but no individuals reported belonging to these religions). We applied the Herfindahl formula [3] to the proportion of individuals in each religious group, estimated using the sampling weights provided by each survey. Using this approach, we were able to compute indices of religious diversity for each survey year in each country (SI Appendix, Tables S1, S2, and S3). Although all surveys included a “no religious denomination” option, we did not include the proportion of individuals under this category in computing our index (for an identical strategy see ref. 40). We considered that the absence of a religious faith is not a form of religion and, for this reason, should not be included in our index along with actual religious affiliations. We assume that individuals are more threatened by other religious denominations that communicate competing values, norms, and ideologies than by nonreligious individuals often sharing the same cultural background. To be more certain of this approach, we considered including the proportion of nonreligious individuals in our main model but found no differences in our results (see additional analysis in SI Appendix). Quality of Life. We assessed quality of life with multiple measures of well-being and self-reported health available from the surveys. The measurement of well-being included questions tapping into happiness (an emotional component) and satisfaction (a cognitive component), which constitute standard measures of well-being (41). Self-reported health was measured using a standard general health question. Some of the items below were reverse-coded, so that for all measures a higher score indicated better well-being and health (for a detailed account of the reasons for including these indicators of quality of life see SI Appendix). In the WVS three specific questions measured quality of life: “Taking all things together, would you say you are happy?” (with answers ranging from 1 “very happy” to 4 “not at all happy”); “All things considered, how satisfied are you with your life as a whole these days?” (with answers ranging from 1 “completely dissatisfied” to 10 “completely satisfied”); and “All in all, how would you describe your state of health these days?” (with answers ranging from 1 “very good” to 4 “poor”). The ESS asked the three following questions: “Taking all things together, how happy would you say you are?” (with answers ranging from 1 “extremely unhappy” to 10 “extremely happy”); “All things considered, how satisfied are you with your life as a whole nowadays?” (with answers ranging from 0 “extremely dissatisfied” to 10 “extremely satisfied”); and “How is your health in general?” (with answers ranging from 1 “very good” to 5 “very bad”). The LB’s happiness question was only asked in two of the survey waves and, for this reason, was discarded from our analyses. Instead we measured quality of life with two items. The first assessed life satisfaction with the question, “In general, would you say that you are satisfied with your life?” (with answers ranging from 1 “very satisfied” to 4 “not at all satisfied”). The second item addressed health by asking, “Over the past 12 mo, would you say your physical health has been very good, good, average, poor or very poor?” (with answers ranging from 1 “very good” to 5 “very poor”). Unfortunately, the LB only asked the health question in five waves (wave 6 in 2001, wave 9 in 2004, wave 10 in 2005, wave 11 in 2006, and wave 12 in 2007) and thus, to preserve comparability between surveys, our analysis focused only on these five waves. As specified in our main analysis, for the WVS and the ESS the three components were aggregated using a latent variable approach. Our modeling approach to the LB was somewhat different given that in this survey we were restricted to two indicators of quality of life and a smaller sample size. To overcome this issue, with the LB we averaged the individual responses to the life satisfaction and health questions to create a measure of quality of life. Both variables were standardized before averaging. Similar to our modeling approach for the WVS and ESS, this quality of life measure was decomposed into a latent between-level variable. Measures Used in the Mediation Analysis. Much diversity research has focused on social capital and social cohesion captured by generalized trust—the placing of trust in others. Generalized trust was measured in wave 7 of the ESS with three items: “Most people can be trusted or you can’t be too careful?” (the answers ranged from 1 “you can’t be too careful” to 10 “most people can be trusted”); “Do you think most people would try to take advantage of you if they got the chance, or would they try to be fair?” (answers ranged from 0 “most people would try to take advantage of me” to 10 “most people would try to be fair”); and “Would you say that most of the time people try to be helpful or that they are mostly looking out for themselves?” (answers ranged from 0 “people mostly look out for themselves” to 10 “people mostly try to be helpful”). Answers to these three questions were averaged to produce a generalized trust variable with a higher score indicating more trust (α = 0.76, with only one factor emerging and explaining 67% of the variance). Intergroup contact was measured with the following item: “How often do you have any contact with people who are of a different race or ethnic group from most [country identifier] people when you are out and about? This could be on public transport, in the street, in shops or in the neighborhood” (the answers ranged from 1 “never” to 7 “every day”). Quality of life was measured with the same ESS items as in the main analysis. The questions about happiness, life satisfaction, and self-reported health were standardized and then averaged. A higher score in this variable indicated better quality of life (α = 0.73, with only one factor emerging and explaining 65% of the variance). In the mediation analysis, the resulting sample with the ESS was identical in size to the LB sample and, as such, we followed the LB’s modeling strategy. We standardized and averaged the individual responses to the questions about generalized trust, intergroup contact, and quality of life. These individual-level variables were then created at the higher level using a structural equation modeling latent variable approach as in the main analysis (for a detailed description of our modeling strategy see SI Appendix). Data and Materials Availability. The WVS, ESS, and LB data are available at www.worldvaluessurvey.org/wvs.jsp, https://www.europeansocialsurvey.org/, and www.latinobarometro.org/lat.jsp. SI Appendix contains additional data.

Acknowledgments Part of this research was conducted while M.R.R. was a visiting scholar at Princeton University, funded by a Fulbright Grant. This research was supported by Marie Curie Fellowship 627982 (to M.R.R.), Eunice Kennedy Shriver National Institute of Child Health and Human Development Grant 5P2CHD047879 (to D.S.M.), and Nuffield Foundation Grant WEL/43108 (to M.R.R., M.R.B., D.S.M., and M.H.). The views expressed are those of the authors and not necessarily those of the funders of this research.

Footnotes Author contributions: M.R.R., M.R.B., D.S.M., and M.H. designed research; M.R.R. performed research; M.R.R. analyzed data; and M.R.R., M.R.B., D.S.M., and M.H. wrote the paper.

Reviewers: O.C., Fernuni Hagen; K.M.H., The University of North Carolina at Chapel Hill; and M.C.W., Harvard University.

Conflict of interest statement: M.H. and O.C. are coauthors on several recent articles.

See Commentary on page 12131.

This article contains supporting information online at www.pnas.org/lookup/suppl/doi:10.1073/pnas.1818884116/-/DCSupplemental.