Segregation and the Spatial Externalities of Inequality: A Theory of Interdependence and Public Goods in Cities

C onventional wisdom claims that racial diversity undermines public goods provision. I show that class-based differences, instead, incentivize cooperation for public goods. Class-based segregation reduces spatial externalities of inequality (e.g., sewage pollution and crime) spilling over from impoverished areas (e.g., slums) to the middle class. Conversely, I argue that in integrated (de-segregated) cities, the scale of such externalities undermines the efficacy of private services (e.g., private security), thereby inducing middle-class preferences for externalities-correcting public goods. Thus, while segregation polarizes preferences, integration aligns the middle class with the poor in coalitions that support public goods over private alternatives. I illustrate the theory using focus groups, a proposed quasi-experimental strategy, and an original face-to-face survey of 4,208 households across 420 neighborhoods in São Paulo, Brazil. The analysis introduces self-interest in reducing intergroup externalities as a mechanism for cooperation for public goods even in diverse societies. Using mechanism vignettes, I distinguish the mechanism from the affective attitudes — racial tolerance, social affinity — of intergroup contact.


INTRODUCTION
A principal question in political economy is why some cities are able to generate high levels of public goods, while others are not.Many cities across the developing world have running sewers, public patrolling, and streetlights evenly distributed throughout the city.Others consistently neglect parts of the city when it comes to the coverage of these services.What explains this difference?Consider the Brazilian cities of Belo Horizonte and Brasília.Although both are capital cities with comparable capacity and resources, the two cities differ considerably in their records of state provision of urban goods and services.As Figures 1 and 2 show, while almost all census tracts in Belo Horizonte have above 80% coverage of sewage collection services, the majority of the census tracts in Brasília have below 40% coverage. 1his observed difference is particularly puzzling considering Brasília is also the capital of Brazil.As the country's capital, the Federal District, Brasília may have better access to resources from the federal government.Why then does Belo Horizonte provide more public goods than does Brasília?Why do cities of comparable size and fiscal capacity have such different amounts of public goods provision?
The distributive politics literature offers racial or ethnic diversity as the primary explanation for deficient public goods provision (Alesina, Baqir, and Easterly  1999; Baldwin and Huber 2010; Habyarimana et al.  2007; Tajfel 1974).Because racial or ethnic heterogeneity precludes a unified voice for public goods, such diversity is negatively correlated with provision.Building on this thesis, recent work by Trounstine (2016)  finds that it is more so about the negative effects of racial segregation than those of diversity.However, in Latin America and many other developing regions of the world, socioeconomic class is equally salient as a sociopolitical cleavage.Although local income diversity or segregation may have effects that overlap or crosscut those of race, its effects on public goods have received limited attention.
I argue that segregation along class lines produces a distinct mechanism: the negative spatial externalities of inequality that spill over between socioeconomic groups in heterogeneous localities.Class differences generate externalities because the lower quality of life among the Have-Nots may also affect the welfare of the Haves.In particular, my core argument is that patterns of class-based segregation in cities affect how voters form preferences for public goods through the spatial externalities of inequality.Cities that are segregated along class lines have a reduced incidence of organized crime, sewage runoff, dengue and other sewage-based diseases that spill over from impoverished localities (e.g., slum settlements) to the rest of the urban populace.Segregation, in reducing the scale of middle-class exposure to such externalities, increases the efficacy (i.e., preferences) of privately-provided household services (e.g., private guards, personal firearms, and private water wells), thereby diminishing dependency on largescale public solutions for addressing externalities.In contrast, because spatial externalities in integrated (de-segregated) cities undercut the efficacy of private services, class-based integration induces middle-class preferences for public goods. 2n recent decades, the growth of a robust market for private services undermines the need for the state's provision of public goods.This article demonstrates that urban segregation is at the core of understanding this public-private divide.While segregation polarizes the preferences of the urban electorate, the spatial integration of class groups can align middle-and upper-class preferences with those of the poor for the public provision of services in place of private alternatives.
The argument is supported by multiple forms of data collection and tested using a mixed-methods approach.Focusing on the context of Brazil, one of the most urbanized as well as most unequal countries in the world, I first collect evidence from semi-structured interviews and focus groups with middle-class neighborhood associations living in different layouts of segregation from urban slums, popularly known in Brazil as favelas, cortiços, or comunidades. 3Drawing on the qualitative evidence, I demonstrate that in integrated (de-segregated) cities, mutual self-interest in reducing crime and sewage pollution not only drives middle-class demand for public services, but also incentivizes different class groups to engage in a form of "collateral cooperation" for them.Contrary to existing theories that emphasize shared identities or affective ties (see, for instance, Enos 2017; Lieberman 2003; Robinson  2020; Singh 2015), I demonstrate that intergroup externalities can produce incentives for cooperation.
To more systematically test the theory on a larger scale, I conduct an analysis of the effects of segregation across neighborhoods within the megacity of São Paulo, Brazil, the largest city in the Western Hemisphere.The distributive politics literature relies exclusively on measures of public goods provision, conflating the demand-(i.e., voter preferences) and supply-side (e.g., politicians' incentives) theories for public goods outcomes.Focusing on the urban middle class, I develop a theory of voter demand for public goods and test it by measuring how preferences for public goods form.Specifically, I recruited and trained a team of over 30 survey enumerators and field assistants to administer an original face-to-face survey with over four thousand households across 420 of the total 456 neighborhoods in São Paulo.The survey is, to my knowledge, the first of household preferences that is geographically representative of a megacity.
Drawing on the literature for estimating the effect of the Great Migration of Blacks to northern cities in the United States (Boustan 2010; Derenoncourt 2022; Fouka,  Mazumder, and Tabellini 2022), I develop a shift-share instrumental variable (SSIV) of predicted migration of the rural poor to urban areas in Brazil.I then interact this shift-share measure with different spatial properties (e.g., uphillness, "urban form") of destination neighborhoods and cities.Combining this proposed quasi-experimental empirical strategy with the georeferenced household survey, I estimate the effect of socioeconomic segregation on voters' perceptions and preferences.In addition, using mechanism vignettes embedded within the survey, I empirically isolate the spatial externalities effect from competing mechanisms proposed in the literature on intergroup relations.
I find that class-based integration (de-segregation) induces middle-class preferences for various types of  public goods (i.e., the provision of streetlights, policing, schools, and sanitation services) that address the spatial externalities of inequality.Conversely, it reduces relative preferences for private options.I show that this is because living in an integrated neighborhood causally increases both the psychological and actual exposure to externalities of inequality reported by middle-class survey respondents.Leveraging the embedded mechanism vignettes, I find that social affinity or racial tolerance cannot explain the positive effect of class-based integration on middle-class preferences for public goods.Critically, I find evidence that integration even generates middle-class aversion toward their poorer neighbors.Instead, the mechanism of integration runs purely through a self-interest motive for reducing cross-class spatial externalities.Last, I confirm that this micro-level mechanism that drives how voters' preferences form has broader observable implications in a cross-sample of cities in Brazil: integrated cities, overall, provide more sewer lines and public security services to informal "slum" settlements (favelas).
This article relates to important work in the urban politics literature on the provision of public goods in urban slums (see, e.g., Auerbach 2019; Auerbach and  Thachil 2018; Holland 2017; Paller 2019; Post 2018;  Rains, Krishna, and Wibbels 2019).It also builds on the broader literature on class politics, albeit departing from the literature's focus on inequality to consider segregation-how inequality manifests geographically in cities. 4 Therefore, it also contributes to the growing social psychology literature on intergroup relations (see Paluck, Green, and Green 2019 for a review) as well as the distributive politics literature on the geographic mechanisms that shape distributive outcomes (see Beramendi 2012; Charnysh 2019; Ejdemyr, Kramon, and  Robinson 2018; Enos 2017; Harris and Posner 2019;  Hopkins 2011; Ichino and Nathan 2013; Kasara 2013;  Kustov and Pardelli 2018; Lieberman 2003; Marques  2016; Nathan 2016; Oliver and Wong 2003; Robinson  2020; Rodden 2019; Tajima, Samphantharak, and Ostwald 2018; Thachil 2017; Trounstine 2016), a literature that focuses almost exclusively on the effects of identities based on race and ethnicity.
The analysis makes several contributions to these literatures.First, viewed as primarily a topic delegated to Criminology, there is limited existing work in Political Science that seeks to understand the choice between the public and private provision of urban services at the household level.Yet, this article demonstrates that this choice has major implications for distributive politics.The segmentation of the market for urban services into private and public provision is problematic for urban welfare for several reasons.Because private solutions are sufficient for the middle and upper class in segregated cities, segregation reduces the need for the "publicness" of urban goods and services.The argument spotlights how the efficacy of small-scale private services in segregated localities crowds out middle-class support for the collective public good.In contrast, class-based integration shifts preferences for private services that are only accessible to those well-off to demand for public provision that also benefits the poor. 5econd, methodologically, the article addresses the selection effect that plagues studies of political geography: individuals may self-sort into segregated or integrated neighborhoods by choice, rendering those integrated to be inherently more tolerant of the out-group.The analysis addresses this source of endogeneity in several ways, offering an original empirical strategy for causally estimating segregation's effects.Third, the concept of spatial externalities of inequality provides a mechanism through which the effects of class may cross-cut those of race.Class-based differences generate a spatial mechanism that binds the welfare of different social class groups together.Contra the implications of the prominent "racial diversity thesis" discussed earlier, class-based integration enables cooperation for public goods between social groups even in a racially diverse setting.Besides the affective mechanisms (e.g., tolerance/prejudice and affinity) that result from intergroup contact, this article demonstrates that diversity and geographic proximity also shape intergroup relations through a self-interest motive for reducing externalities from out-groups.
As cauldrons of economic inequality, cities embed class-based segregation.The concentration of poverty and quality of life deficits in informal "slum" settlements, such as the favelas and cortiços in Brazil, the colonias proletárias in Mexico, the villas miserias in Argentina, the gecekondus in Turkey, the bidonvilles in North Africa, the rookeries in eighteenth century England, and even the modern American ghetto, also come at a cost to the city's middle class.The pervasiveness of these settlements in even the wealthier quarters of the city highlights the interdependence of urban welfare through the spatial externalities of inequality.

THEORY The Concept: Spatial Externalities of Inequality
Seminal models in public choice theory focus largely on the supply-side determinants of efficient provision, providing theories of local government and of optimal decentralization (Ostrom, Tiebout, and Warren 1961;  Tiebout 1956).Similarly, the distributive politics literature offers supply-side theories of "top-down" provision or explanations for collective mobilization for public goods.Actual demand, or preferences, for public goods is assumed to be static: voters always prefer more.Even in models of revealed preference (e.g., Tiebout 1956), preferences are assumed, or "revealed," based on residents' sorting behavior.However, our understanding of how voters' preferences for public goods form in the first place remains much more limited.Departing from the literature's focus on public goods provision, I develop a theory of preference formation for public goods.
Public welfare in cities almost always concerns externalities.Just as how urban density accelerates the flow of goods and the diffusion of information, it also hastens the spread of infectious disease and crime (Glaeser  2014).An externality is a type of "missing market" of the unpriced effects of one agent's or entity's activity on the welfare of another (Arrow 1969).Because externalities are ubiquitous in cities, it is difficult to observe systematic variation in their patterns.What distinguishes a spatial externality of inequality from the broader set of social ills that characterizes city life?I outline three definitional attributes: relative deprivation, concentration of poverty, and spatial proximity.
Increasing urban density generates a series of positive and negative externalities, such as traffic congestion, pollution, and the agglomeration advantages from the proximity of firms.A spatial externality of inequality differs from these conventional urban externalities in how it is sourced.Urban externalities are an inadvertent consequence of urban density.In contrast, inequality-specifically, relative deprivation in living conditions-generates spatial externalities of inequality.Society is heterogeneous in class-based identities and in quality of life.A homogenous society that is uniformly deprived or uniformly well-off does not render any one group to more likely be at the source of the externality than the others.Instead, the externalities of inequality only materialize when there are disparities in quality of life within the populace.
Second, I assume that in cities, a degree of geographic concentration of the poor always exists.There is no empirical reality in which the poor are completely integrated to the extent that they all live in the same apartment complexes as the middle and upper classes.Even in the most integrated (de-segregated) cities, concentrated pockets of poverty in the form of a slum or a "ghetto" exist.As a definitional element, the concentration of poverty in slums is important, because it demarcates the urban poor as a visibly distinct social group.It clarifies the main distinction between urban externalities and externalities of inequality: the latter occurs between groups, not individuals.Because every resident of the city is both a contributor to an externality, such as congestion, and among those affected by it, it is an internalized externality.By nature of their characteristic of production by all individuals of the city, urban externalities tend to be internalized externalities.In contrast, when poverty is concentrated in slums, such concentration highlights class-based identities, creating two distinct groups: urban squatters as the consistent "producers" of negative externalities and the neighboring middle class as "the affected." The geographic concentration of poverty and, historically, public service deficiencies in slums (favelas) in Brazil renders them to be point sources of sewage run-off and organized criminal violence. 6In the absence of sufficient sewage collection, residents leave sewage waste in exposed landfills or dump waste in natural waterways.With deficiencies in policing services and in streetlights, favelas also become breeding grounds for organized crime.Lacking sufficient access to public schools and, as a result, employment opportunities, the idle youth fuel the growth of these drug trafficking networks.
These negative spatial effects are often not contained within the borders of these settlements.Sewage contamination flowing from the impoverished imposes externality costs that only the middle class who live downstream from the favela bear.In addition, violence from turf wars between rival criminal factions is not always geographically limited within favela borders.Non-favela residents may get caught in the crossfire of such neighborhood gang violence.Regardless of whether the actual incidence of crime is geographically limited, the "sound of gunshots in the favelas" knows no borders and instills pervasive psychological fear. 7hen such effects pervade the borders of slums and spill over into neighboring territories, they create a spatial externality of inequality.The concept of an externality of inequality illustrates that beyond the poverty of the concentrated poor, inequality-a society heterogeneous along class lines-comes at a cost even to those at the upper tranches of the income distribution.I argue that although it is a necessary condition, inequality alone is insufficient for observing such cross-class externalities.The deprivation of the poor only generates externalities to the rich to the extent that the spatial arrangement of groups allows for it.Therefore, the third core definitional element is that the spatial externalities of inequality are a function of the segregation of social groups.In this first step of the theoretical exposition, I argue that in cities that have a more spatially integrated (desegregated) distribution of social class groups, a larger share of the middle class are exposed to the negative effects of concentrated poverty that spill over from slum settlements.Physical "spatial distance" and neighborhood composition directly condition the degree of exposure to such cross-class effects.
Hypothesis 1: Socioeconomic integration (desegregation) increases middle-class exposure to the spatial externalities of inequality.

The Argument: Segregation and Preferences for Public Goods and Private Alternatives
Beyond the affective impressions (e.g., prejudice or affinity) that may result from intergroup contact emphasized in conventional theories, patterns of segregation and integration also generate physical and psychological spillover effects that have an effect on intergroup relations and voter preferences.In this section, I draw on focus groups with middle-class neighborhood associations to examine these effects.Throughout the section, I make reference to the following description of three hypothetical cities with different layouts of segregation.These idealized molds apply to both the neighborhood as well as the city as units of analyses.In Figure 3, each orange shape represents a favela and the shapes in blue represent clusters of the middle and upper class.8Each favela is not a neighborhood in itself, but rather is located within a neighborhood (i.e., cluster of three shapes) either with other favelas or with middle-and upper-class enclaves (shapes).And the spatial externalities of inequality occur between class groups (i.e., each shape).
City A is characterized by the complete segregation and peripheralization of favelas on the outskirts of the city.City B exhibits more integration, yet, there are still clusters of favelas that exhibit varying degrees of segregation from the rest of the populace.Last, City C has a layout of complete integration (de-segregation).Political geography is best understood as a set of nested units: favelas (i.e., each shape) within neighborhoods, neighborhoods within cities, cities within states, and states within the nation (see Section A2 in Supplementary Material for more on the unit of analysis).I assume that voters form preferences according to the segregation of their neighborhood.However, the middle class in the most segregated (City A) and integrated (City C) cities also live in neighborhoods in which they are correspondingly segregated and integrated from the poor.
To illustrate examples of these conceptual molds, I return to the two cities discussed previously.Recall that although Brasília is the capital of Brazil, it has inferior solid waste collection services relative to Belo Horizonte.I now clarify that the two cities represent the extremes of segregation, where Brasília is emblematic of City A and Belo Horizonte of City C. Brazilian architects Lúcio Costa, Oscar Niemeyer, and Joaquim Cardozo created one of the most socioeconomically segregated cities in Brazil when they made a distinction between the planned administrative city center, the Plano Piloto, and the unplanned suburbs of Brasília, the cidades satélites ("satellite cities").Although regarded by urban planners and historians as a distinct case of top-down modernist planning (Holston 1989), Brasília is comparable to Belo Horizonte, given their shared features as both modern and planned cities.
Focus groups reveal that the middle class in segregated neighborhoods in Brasília have very limited exposure to favelas.Geographically distanced from the organized crime and sewage run-off that flows from favelas, the segregated middle class experience these effects on a much smaller scale.Reduced groundwater contamination from sewage run-off increases the viability of private household water wells.Limited exposure to crime, likewise, increases the efficacy of private security measures that can only be financed on a smaller scale (e.g., property security guards and personal firearms).Segregation, in reducing the scale of spillovers in crime and pollution, increases the efficacy of privately-provided services.I argue that as a result, segregation from the poor minimizes the middle class' dependency on large-scale public solutions for addressing externalities.The middle class in Brasília's segregated center, the Plano Piloto, for instance, rarely supported the extension of public services to those poorer living in the cidades satélites ("satellite cities") outside of it.In response to the question, "Are there public services supported by both the middle class and the poor in the city?," interviewed Federal Deputy Erika Kokay of Brasília responds, "I don't think so, and this is because they don't live in the same location here.The 'cities' [neighborhoods] here are FIGURE 3. Three Layouts of Segregation either all poor or all rich.There aren't mixed 'cities' in the Federal District.Brasília is quite segregated overall, and even the different 'cities' within it are segregated….The middle class here, the rich here don't see the poor.It's like the social problems are invisible."9 In stark contrast, focus group participants in Belo Horizonte (City C) think of the problems of crime and pollution quite differently, because they experience these effects on a much larger scale."Scale" refers to the intensity or geographic reach of the externality, and critically, the provision of public and private goods occurs on a different scale (Ostrom, Tiebout, and Warren 1961).As these externality effects of living near the poor increase with integration, the perceived efficacy of small-scale private investments in urban services decreases.No amount of private provision seems sufficient, given the pervasiveness of slums dispersed throughout City C. For example, because proximity to slums increases the perceived scale of crime, the middle class no longer regards private security measures to be an effective substitute for public policing.This is because they view favelas as a refuge for drug trafficking organizations (DTOs); thus, they associate these settlements with a form of large-scale crime that is organized.
Evidence from focus groups shows that while residents in Brasília (City A) view private and public security measures as substitutes, those in integrated Belo Horizonte (City C) perceive public security to be indispensable even when they invest in private measures.And in City C, sewage contamination can become a public health crisis that precludes reliance on private water wells and household measures for addressing sewage pollution.I argue that precisely because spatial externalities undercut the perceived efficacy of these private measures, integration induces middleclass preferences for the public provision of urban services in place of private options.
To summarize, in City A, the effects of organized crime and of open sewerage fall predominantly within communities of the segregated poor.With integration, the middle class increasingly bears a higher incidence of this form of welfare loss.The welfare gains to addressing inequities in quality of life are only politically salient when such effects spill over across slum borders."A function of government," writes Ostrom, Tiebout,  and Warren (1961, 832), "then, is to internalize the externalities," a process that differentiates the public good from private provision.Whereas the segregated middle class perceive crime as an urban externality between individuals, those integrated view such urban externalities through a classist lens as externalities of inequality between class groups.They recognize that crime and sewage pollution are not haphazard occurrences that can be addressed privately, but rather are a systematic consequence of the public service deprivation of the poor, a deprivation that can only be addressed by the state.Such a classist view of urban crime and contamination magnifies the salience of the externalities-correcting features of public goods.
Hypothesis 2a: Socioeconomic integration (desegregation) decreases relative preferences for private urban services.
Hypothesis 2b: Socioeconomic integration-by generating spatial externalities of inequality-induces preferences for the public provision of "externality goods."

Cooperation through Interdependence under Socioeconomic Integration
In this section, I further clarify the nature of cross-class relations in City C, drawing on examples from Belo Horizonte to illustrate how the spatial externalities in crime, in particular, affects patterns in collective demandmaking for urban services.Historically, throughout the late 1900s, the favelas of Brazil were highly mobilized.The focus of this article on the middle class is not to say that the favelas are mere bystanders in the process of demand-making for urban services.However, in many favelas, community mobilization proves to be increasingly difficult because of the presence of DTOs.Focus groups with favela neighborhood associations reveal that especially in the most high crime favelas, residents' fear of violent retaliation by the DTOs reduces their civic participation.The assassination of active community leaders in favelas is common. 10onversely, the high incidence of violent crime induces mobilization among the neighboring middle and upper class.They voice their preferences in both their own associations and in CONSEGs, Conselhos Comunitários de Segurança (Community Security Councils), a participatory governance institution prevalent across urban Brazil that brings neighborhood associations in dialogue with personnel from both the Municipal and State Secretaries of Public Security, representatives from City Hall ("Prefeitura"), and commanders from the Military and Civil Police.In these areas of Belo Horizonte dominated by organized criminal forces, middle-class neighborhood associations, thus, play a special role.Microsociological approaches to explaining turnout and social movements point to the intensity and number of social "strains" or "grievances" experienced by particular social groups (Kitschelt 1986).In creating an extraneous grievance for the middle class, the spatial externalities effect provides them with the "selective incentives" to turn out in favor of public goods that also benefit the poor.They become Olson's (1971) "privileged group," since they seek to gain from an externalities-correcting public good more than it would cost them to unilaterally provide it.
In Belo Horizonte, interviewed neighborhood association leaders describe a "cross-pollination" relationship in which the leaders of middle-class and favela associations regularly converse. 11The association, Associação de Moradores do Bairro Belvedere (henceforth Belvedere), provides the most prominent example of this type of relationship."You must've seen the main favela [Papagaio] on your drive up here.It is at our gate, and we also have two more behind us… We have an excellent relationship with these three favelas; we respect each other," remarked Marco Túlio, the President of Belvedere.Middle-class Belvedere initiated the relationship when they first created the space for dialogue with the poor.As Marco Túlio explains, "We created the conditions so that they have access to our associations… It is important to show them our cooperation." 12elf-interest motivations for reducing externalities drove these gregarious gestures toward the poor.Critically, middle-class Belvedere recognizes that the extension of infrastructural public services to favelas requires, at least, the consent of these communities.Driven by two different self-interest motives, the favelados (i.e., favela residents) return the gesture.First, such an alliance can help even favelas silenced by the presence of DTOs discreetly improve their access to public goods.In addition, they also have a self-interest in reducing the perception that there is intentionality in the crime or sewage that spills over across their borders.The favela leaders openly acknowledge that their impoverishment may have externality effects on their neighbors, communicating a shared commitment to mitigating these effects.Marco Túlio described a neighboring favela leader discreetly approaching Belvedere: "When we were experiencing our period of high crime, the leader of the favela came to me and said, 'You have so much influence.Could you ask the Policía Militar to place a patrol here?…'They wanted to reduce the perception that they are responsible for robbing Belvedere, you understand?This was their way of showing their cooperation."Thus, a cross-class collateral cooperation for public goods develops, a form of social cooperation between out-groups that is maintained only with the knowledge that the welfare losses are mutual.The externalities are shared, as the majority of the poor are also affected by the open sewerage and organized criminal violence that plague their communities.The understanding that the welfare losses are mutual provides "collateral" toward sustaining cooperative relations.Although the favelados differ from the residents of Belvedere in that they are largely of Afro-Brazilian descent, cooperation persists even in light of this racial divide.Even when proximity of middle class and poor generates a degree of hostility in relations, self-interest concerns for addressing externalities take precedence.Under such a context of interdependent welfare, mutual self-interest in reducing externalities encourages cooperation for public goods even in a heterogeneous society.In the case of Belvedere and neighboring favelas, Morro do Papagaio, and Acabo Mundo, these collective efforts culminated in the addition of two Policía Militar (Military Police) "bases" in the region.
A common critique of Putnam's (1993) theory of social capital is that it largely applies to homogenous communities.Similarly, the distributive politics literature argues that "common culture" (e.g., shared ethnicity, language, and history) in homogenous communities is a prime mechanism that explains improved public goods provision in these communities (Lieberman 2003; Singh 2015).In contrast to existing theories that tout the benefits of homogeneous societies, I argue that collateral cooperation for public goods develops in heterogeneous localities between social groups demarcated by class-based identities.The argument, therefore, builds on existing studies that illustrate the development of cooperative relations even in communities characterized by difference (Fearon and Laitin 1996; Samii 2013; Varshney 2008).Besides, how ethnically diverse localities can generate cooperation through in-group sanctioning (Fearon and Laitin 1996)  or through ethnically integrated civic, military, or business associations (Samii 2013; Varshney 2008), I argue that class-based differences enables a form of selective cooperation for certain types of public goods.The spatial externalities mechanism binds the welfare of the middle class to that of the urban poor in City C, rendering them interdependent.The promise of mutual gains in welfare from addressing the shared exposure to these social ills of poverty and inequality is what defines the collateral cooperation that forms in spatially integrated cities.

Clarifying the Mechanisms of Segregation
This article offers the spatial externalities of inequality as an unexplored mechanism through which sociopolitical geography affects the provision of public goods.Aside from this mechanism, the existing literature points to two alternative mechanisms that could be at play (see Figure 4).First, models of residential sorting (e.g., Tiebout 1956) imply that segregation may be a consequence as opposed to a cause of voters' preferences.If voters self-select into neighborhoods, the middle class who live proximate to the poor may be inherently more tolerant of the poor.Similarly, even in the absence of self-selection, proximity and contact through integration can increase social affinity or even altruism toward favela residents.Regardless of whether integration is a cause or a consequence of preferences, the implication here is that a different mechanism may be at work: tolerance, or even social affinity or altruism, toward favela residents can drive middle-class preferences for public goods for favelas.
Second, since socioeconomic identities often go hand-in-hand with racial or ethnic ones, the effect of race or ethnicity is another relevant alternative mechanism.In Brazil, class and racial identities are often  (Telles 2014).Class and racial identities are also highly entangled across space in Brazil (Paschel 2016).Within cities, such as São Paulo, patterns of race-based segregation are superimposed onto those of segregation by class (Marques and  França 2020).Given the salience of race and the ways in which it is intertwined with class identities in Brazil, it is a dimension that deserves full consideration.To parse out the effects of class from those of race, I use original measures of respondents' skin color and of racial segregation to determine the extent to which race drives the main results.I also theorize and test possible race-based mechanisms that may affect public goods preferences.
On the one hand, economist Werner Troesken observed that at the height of the Jim Crow era in the United States, public officials expanded the provision of water and sewage services for Black Americans as a means to "protect" white neighborhoods from the spread of diseases.Although the empirical trend he observes in the United States is comparable to the one documented in this article, Troesken  (2004) argues that racism and discrimination, the association of Black communities with disease, is at the source of this service expansion.On the other hand, racial tolerance instead of prejudice also could produce preferences for public goods for the outgroup.Allport's (1954) "contact hypothesis" claims that under the appropriate conditions, intergroup contact is one of the most effective ways to reduce racial prejudice.An observable implication of the "contact hypothesis" is that the spatial integration of socioeconomic groups, if conflated with race, could improve public goods if it, instead, increases racial tolerance.
I propose the spatial externalities of inequality as a critical alternative mechanism that links segregation to public goods outcomes.In contrast to the social affinity or altruism mechanism, the middle class prefers public goods shared with the poor as a result of a self-interest motive for reducing their exposure to externalities.Beyond the ways in which contact may induce or reduce racial prejudice if individuals conflate race with class, there are also the perceived risks of physical harm or public health concerns associated with living proximate to an out-group that is socioeconomically inferior.I use survey questions and embedded mechanism experiments within the survey to test the spatial externalities mechanism against these main alternative mechanisms derived from the literature.To clarify, I test for the possibility that class is conflated with race.The argument does not intend to downplay the effects of race as a mechanism.Rather, I argue that socioeconomic segregation has a distinct effect that does not run through a racebased mechanism.

DATA AND RESEARCH DESIGN
I assume that voters form preferences according to the segregation of their neighborhood.However, there is limited distinction between the neighborhood-and citylevel: voters living in cities at the extremes of segregation, such as Brasília (City A) and Belo Horizonte (City C), also live segregated or integrated from the poor at the neighborhood level.Therefore, the comparison of the two cities, likewise, compares their neighborhoods.Alternatively, São Paulo is a City B, exhibiting the full range (City A to City C) in variation of segregation across neighborhoods within one city.I, therefore, conduct a large-N analysis of segregation across neighborhoods within São Paulo to further confirm the theorized micro-level mechanisms that drive preferences for public goods.My data collection and research design is comprised of three parts (Xu 2023).First, I calculate measures of segregation for each neighborhood in São Paulo (i.e., independent variable).Second, I combine these measures with the proposed identification strategy.Third, I collect a face-to-face survey of household preferences across neighborhoods in the city (i.e., dependent variables and experimental tests of mechanisms) to pair with the identification strategy and the segregation indices.In the subsections that follow, I describe each of the components of the research design in greater detail.

Measuring Segregation
I use the seg package in R, Brazilian Census tract data for 2000 and 2010 available from the Instituto Brasileiro de Geografia e Estatística (IBGE), and shapefiles of administrative boundaries to calculate four different measures of segregation: the spatial dissimilarity, the spatial information theory, the interaction, and the isolation indices for each neighborhood in São Paulo and also for each municipality in Brazil.These four measures vary in the extent to which they capture the two main conceptual dimensions of segregation: (1) spatial exposure (or spatial isolation), and (2) spatial evenness (or spatial clustering).I reserve the technical details regarding these dimensions and the exact calculation of these indices in Section A8 of the Supplementary Material.The main index I use, the spatial dissimilarity index, is mapped for all neighborhoods in São Paulo (see Figure 5).
I test the robustness of the results by using different rank-order indices of segregation.To further gauge the robustness of the results, I also calculate segregation using different thresholds of income; however, I define the poor as those making below two minimum wages (MWs) in the main results.In Brazil, household income is frequently expressed in terms of MWs and divided into five categories of class: Classes A-E.Households with per capita income under 2MW comprise those in Class E, the lower-class living largely in informal settlements.Following IBGE, I define the middle class as those in Classes C and D.

Measuring Preferences: An Original Household Survey
To measure preferences for public and private goods, I administer an original face-to-face survey with households across neighborhoods in São Paulo, Brazil in 2019.The survey covers 420 of the total 456 neighborhoods in the megacity and is inclusive of over four thousand households.Existing survey firms that operate in Brazil do not offer the option of face-to-face surveys with randomized sampling within such a microlevel unit of aggregation: the neighborhood.Hence, I recruited and trained a team of over 30 survey enumerators from four of the local universities.Enumerators received real-time geolocation devices for collecting identifiers at the household address level.Each household's precise geolocation, their neighborhood of residence, determines their segregation experience.I worked with the São Paulo division of the Brazilian Census Bureau to ascertain exactly which set of household addresses fall within the boundaries of each neighborhood and census tract to be able to feed the list of addresses into an algorithm for multi-stage randomized area sampling.Section A10 of the Supplementary Material details the exact sampling strategy and provides summary statistics for the survey.
To measure preferences for public goods, respondents were asked whether they strongly agree or disagree-on a Likert scale from 1 to 7-with the claim that the government should use more tax money to invest in [X type] of public good.Respondents were asked about different types of public goods, not all of which have externality-correcting features.To discourage respondents from answering 7, Strongly Agree, for every type of public good, survey enumerators emphasized that such investments require tax money.I collect two different measures of preferences for public goods: (1) preferences for goods provided directly in favelas within the neighborhood, and (2) preferences for aggregate provision in the neighborhood as a whole.The empirical results for both measures are comparable.
Next, to measure preferences for private security, I use the following survey question: "It is most effective to pay for private security services (e.g., private guards, firearms, security cameras, and surveillance systems) to address crime in my neighborhood or district.To what extent do you agree or disagree with this sentence?"Survey responses are measured on a Likert scale from 1 to 7. In addition, using the identical survey measure (1 to 7) of public policing, I create a measure of the ratio of preferences for private relative to those for public security.I refer to this measure as one of respondents' relative preferences for private security.
To measure exposure to the spatial externalities of inequality, respondents were asked, "Thinking of the neighborhood in which you live and the possibility of being a victim of assault, robbery, or violence by criminal groups, do you feel: very secure, somewhat secure, somewhat insecure, very insecure?"Given the four categories, the responses range on a scale of 1 to 4, with 4 indicating very unsafe.In addition to this measure of the psychological fear of crime, respondents were also asked whether they or a member of their immediate family have been an actual victim of crime in their neighborhood within the last 12 months, measured as an indicator variable.In addition, respondents were asked about their exposure to sewage contamination: As with the question measuring fear of crime, responses range on a scale of 1 to 4, with 4 indicating the highest level of concern.These survey questions were pre-tested on different online samples of Brazilians, and as much as possible, they borrow from standard public opinion surveys for the Latin American region.

Measuring the Mechanisms: Experimental Survey Design
As discussed, aside from the spatial externalities mechanism, integration or segregation could also affect preferences for public goods through alternative mechanisms based on racial identities or affective ties.To adjudicate between competing mechanisms, I first directly ask survey respondents about their level of social affinity or altruism toward the poor and their racial tolerance.Although it is common for Latin American Public Opinion Project (LAPOP) and other public opinion survey initiatives to use such standard survey questions, this method is prone to social desirability bias.To address this bias, I also leverage an experimental survey design that more subtly gauges respondents' prejudice or tolerance and affective ties.
In the middle of the survey, each respondent receives a randomized political campaign speech (i.e., a vignette) of a hypothetical local politician that focuses on one of four possible issue areas: (1) lower quality of life in favelas and generous tendencies toward the poor, (2) racial inequities and the need for racial tolerance, (3) urban crime and the need to address especially organized crime from favelas, or (4) the general wellbeing of the city and the need for improved well-being (control group).The campaign speeches mimic those that actual local politicians routinely deliver during Brazil's televised "Free Electoral Hour."The exact campaign speeches used are provided in Section A10.2 of the Supplementary Material.After respondents were read a randomized speech, they were asked, "How likely are you to vote for this candidate?" The response options range on a five-point scale from "very likely" to "very unlikely."The embedded campaign endorsement question serves two purposes.First, it measures the red arrows (dashed) in Figure 4: the effect of segregation on each of the mechanisms.Using measures of each respondent's geolocation (i.e., their segregation experience), I estimate the effects of segregation on respondents' endorsement of each campaign issue.The analysis reveals whether segregation results in more or less support for a campaign platform that addresses crime, more or less support for one that discusses generosity toward the poor, and more or less support for one that advocates for racial equality.
In addition, the embedded mechanism vignettes serve a second purpose: they measure the combined effect of the red (dashed) and blue (solid) arrows in Figure 4. Beyond the direct effects of integration on each of the mechanisms, I isolate the causal mediation effect of each mechanism.I use the embedded campaign platforms as vignettes or randomized encouragement primers to evoke fear of crime, social affinity toward the poor, or racial tolerance before respondents receive the set of survey questions measuring their preferences.Without the respondent's knowledge, the campaign platform of the hypothetical local candidate primes them to consider a specific mechanism.Instrumenting for the effects of segregation once again, the analysis reveals how the effect of segregation on preferences differs for respondents who received a crime vignette compared to one about racial equality or generosity toward the poor.And all effect sizes are calculated relative to the mediation effect of the control group. 13

Identification Strategy for Segregation
Because the middle class may sort into segregated or integrated neighborhoods by choice, the layout of segregation may reflect the middle class' preferences, their level of tolerance of the poor by default.This is different from isolating the causal effect of one's geographic environment on one's preferences.Empirical studies in the distributive politics literature on segregation have struggled to address this potential source of reverse causality, largely focusing instead on correlation effects.To address the endogeneity of segregation, I propose an identification strategy that I construct for both the neighborhood-and city-level. 14To simplify the discussion, I only describe the construction of the instrument in reference to the city-level.Besides the identification strategy, I also control for residential sorting directly (see next section).
The formation and growth of slums in developing cities is a result of decades of rapid rural-to-urban migration of the poor.Therefore, drawing on the literature for estimating the effect of the Great Migration of Blacks to northern cities in the United States (Boustan  2010; Derenoncourt 2022; Fouka, Mazumder, and  Tabellini 2022), I develop a shift-share instrumental variable (SSIV) of predicted migration of the rural poor to cities in Brazil and to neighborhoods in São Paulo.The empirical strategy leverages the fact that rural migrants settle in urban areas where previous migrants from their communities had moved, creating specific linkages between rural locations and urban destinations (Boustan 2010; Derenoncourt 2022).I interact exogenous "pushes" in out-migration from origin localities with these historical migration patterns to destination localities (historical "pulls") to construct an instrument for changes in the population of the poor in each city.In Section A9 of the Supplementary Material, I illustrate a specific example of the shift-share instrument and the exact steps undertaken to construct it.
The instrument exploits inter-temporal variation: previous period historical in-migration "pull factors" compared to current period out-migration "push factors."In addition, it uses cross-sectional variation: the variation in the location of origin of different migrant groups.I explore a series of rural "push factors" (or "keep factors") that drive or deter migration of the rural poor to cities.The colonial legacies of latifundia land tenure patterns and slavery, for example, placed most of the agricultural farmland in Brazil in the hands of a minority of landed elites.Hence, I use varying levels of land inequality across agricultural municipalities as a "push factor" for predicting the out-migration of rural workers.I also use the cultivation of certain "cash crops," such as cassava, soy, coffee, cocoa, and corn, propitious for growth in Northeast Brazil as "push factors" for rural out-migration.In addition, exogenous changes to the agricultural economy in the form of drought, the adoption of genetically modified (GM) soy in 2003 and that of genetically modified maize, and a new land reform program that spans from 1988 to 2013 provide additional "pushes" for predicting out-migration (see Section A9 of the Supplementary Material for data sources).Tables A5 and A6 in the Supplementary Material show the strength of each of these "push" or "keep factors."I measure historical settlement (i.e., pre-2000 migrant location choice) of the rural poor using the 2000 Brazilian census, which reports the 1995 municipality of residence.I use this data to construct a matrix of rural-to-urban municipality weights.I then use these 1995-2000 weights to assign predicted migration for the 2000-10 period.Specifically, I assign predicted migration outflows as follows: where the variables are as follows: • Mc,t is the predicted in-migration of the poor into municipality c in decade t: • Mm,t is the predicted out-migration of the poor from rural municipality m: • γ c,m is the share of rural municipality m's outmigrants between 1995 and 2000 who reside in destination municipality c by 2000.
Conceptually, the SSIV captures exogenous increases or decreases in the population of the poor within each city.In addition, other factors specific to each city determine where the poor settles and the extent to which non-poor residents can segregate.For example, physical barriers created by topographic features affect patterns in segregation.Therefore, I calculate a measure of the mean uphill slope of each city by overlaying shapefiles of municipal boundaries with 30 arc second (1 km) resolution elevation data produced by NASA's Shuttle Radar Topography Mission."Uphillness" determines patterns of urban sprawl and affects the location choices of households.To construct the citylevel instrumental variable, I interact the SSIV with this measure of mean "uphillness."At the neighborhoodlevel, I use only the SSIV to identify segregation, although I confirm the robustness of the main results to using the interaction instrument.When predicted in-migration is calculated for each neighborhood, the insertion of poor migrants into such a small area directly reduces neighborhood-level segregation.15I discuss and test the identification assumptions in detail in Sections A9-A11 of the Supplementary Material.

Estimation Strategy
I combine all of the components of the research design together by using the proposed quasi-experimental strategy to causally estimate the effects of socioeconomic integration (i.e., reduced segregation) on either the collected survey responses across neighborhoods or First Stage IV: Second Stage: where the instrument, Z c , is the interaction of the predicted in-migration SSIV with a measure of "uphillness" of the city ( Mc,t Á h c ).In the first-stage, I instrument for the socioeconomic segregation of each municipality c.In the second-stage, we observe the effects of segregation, predicted by the instrument, on the survey responses measuring preferences and the mechanisms.To confirm the robustness of the results, I also estimate the results controlling for the baseline share of poor already with access to public goods (X 0 c ) (see Section A5 of the Supplementary Material).17This alternative specification confirms that the estimated effects on preferences are not driven by pre-existing levels of public goods.I estimate these 2SLS models both with and without "post-treatment" control variables to avoid bias from conditioning on concomitant variables.I also show balance on these respondent-(e.g., gender, age, respondent skin color, education, and household income) and neighborhood-or city-level variables (i.e., racial segregation, Gini coefficient, mean income, and poverty levels) for the instrument in Section A11.4 of the Supplementary Material.

Spatial Interdependence, Robustness, and Additional Measures for Addressing Sorting
Beyond the identification strategy proposed, I take an additional measure to further ensure the results are not driven by a residential sorting effect.Specifically, I control for residential sorting directly by using a survey question that asks respondents how long they have lived in their current neighborhood.I estimate the results controlling for the number of years of residence, and I also estimate the results including only respondents who have lived in the neighborhood since before 2000 (i.e., before the period of the calculated SSIV) to ensure that the results are not driven by sorting.The results for this test are presented in Table A17 in the Supplementary Material.Beyond these measures for addressing sorting, I observe that sorting also cannot explain the full extent of the results.It cannot explain why integration only increases preferences for certain types of public goods, yet not others.Additionally, I also account for spatial interdependence in the outcome and in the instrument by estimating a modified spatial-2SLS model (Betz, Cook, and Hollenbach 2020) (see Section A12.3 of the Supplementary Material).

Preferences for Public Goods and for Private Provision
The central argument of this study is that class-based integration has specifically a demand-side effect on middle-class preferences for public "externality goods" (Hypothesis 2a), while it reduces relative preferences for private alternatives (Hypothesis 2b).A public "externality good" is one that, even when geographically targeted toward slums, also provides ancillary welfare gains to residents beyond slum borders by reducing externalities.To test Hypothesis 2a, I estimate 2SLS models where I use the proposed instrumental variable to instrument for the effect of integration (i.e., reduced segregation) on survey responses measuring preferences.Model 1 presents the first-stage effects of the instrument (Equation 2), while Models 2-5 show the second-stage estimates (Equation 3). 18he results show that class-based integration has a strong negative effect on relative preferences for private security (Model 5).I make a distinction between absolute and relative preferences for private security (Table 1).It is not the case that the middle class prefers fewer personal firearms and private guards in integrated Belo Horizonte.In fact, increasing integration has no effect on absolute demand for private security.The critical insight here is that integration reduces relative preferences for private (relative to public) security.The reverse is also true: segregation increases relative preferences for private security in place of public options. 19n contrast, integration causally increases preferences for all types of public goods (i.e., streetlights, public patrolling, and sewage collection) that address the externalities of inequality (Models 2-4), confirming the core hypothesis.Given preferences are measured on a Likert scale from 1 to 7, these estimated effects of integration are sizable.Although paved streets are similar to streetlights in that it also reduces crime, integration has no effect on preferences for paving streets.However, integration does induce preferences for public schools (see Section A3.1 of the Supplementary Material).Crime is an externality of inequality that still binds middle-class welfare to public education, even when they opt for private schooling.In focus groups, the middle class in City C recognize that the idle youth in favelas fuels recruitment by organized criminal forces.In addition, they discuss how pickpocketing and petty street theft instigated by favela residents tend to be on the part of the favela youth.They discuss the need for better education opportunities to keep the youth in schools.In contrast, integration has no effect on preferences for mass transit and hospitals, public goods that do not address cross-class externalities (see Section A3 of the Supplementary Material for more on differences between public goods).
Why does integration reduce relative preferences for private security?Using a survey measure of how frequently respondents encounter the poor in the streets, I find that the frequency of encounters has a strong negative association (−0.034) with preferences for private security (see Section A7 of the Supplementary Material).Evidence from focus groups reveals that because the middle class associates the poor and slum settlements with organized crime, increased frequency of encounters with the poor in the streets directly affects their perception of the efficacy of private solutions.This occurs even when residents do not personally experience acts of crime.Therefore, with increased contact through integration, private security is no longer perceived as an effective substitute for public policing.

Exploring the Mechanisms of Segregation
My theory expects that integration causally induces middle-class preferences for public goods, because it increases the incidence of the spatial externalities of inequality (Hypothesis 1).I test for this theorized mechanism by, once again, using the proposed SSIV to instrument for the effects of integration on the perception of such externalities measured using the household survey.As discussed, respondents were asked about both their psychological fear of crime and whether they or a member of their immediate family have been an actual victim of crime in their neighborhood.In addition, respondents were asked about their concern for sewage pollution.Table 2 presents the results.
The results show that socioeconomic integration has a large positive effect on fear of crime among middle-class respondents (p < 0:01).Specifically, class-based integration causally induces respondents' fear of crime by around a full unit on a four-point scale.In addition, integration also increases the incidence of actual crime victimization experienced by respondents in the last 12 months and their concern for sewage pollution.This set of results provides direct support for Hypothesis 1: integration causally increases both the psychological and physical incidence of the spatial externalities of inequality.

Testing Alternative Mechanisms
Next, I examine whether there are alternative mechanisms that could explain the effect of integration on preferences for public goods.As discussed previously, the three mechanisms (i.e., spatial externalities, social affinity, and racial tolerance/prejudice) offer analytically distinct explanations for the link between integration and preferences for public goods.The problem for inference, however, is that the different mechanisms yield empirical predictions that are observationally equivalent.
I address this empirical challenge in several ways.To begin, I compare the effects of integration on fear of crime (i.e., externalities mechanism) discussed in the previous section against its effects on the alternative mechanisms derived from the literature (i.e., red arrows [dashed] in Figure 4).To measure social affinity toward the poor, respondents were asked about their preferences for specifically public "altruistic goods" (e.g., soup kitchens and daycares in slums).A foil to an "externality good," an "altruistic good" provides considerable benefits to favela residents without conferring the ancillary benefits of externalities reduction to residents beyond slum borders.Although it is the case that any good or service that improves the lives of the poor could also reduce the likelihood they beg in the streets or engage in organized crime, the middle class view these spillover benefits of soup kitchens and daycares to be limited.Preferences for these goods, therefore, capture only a degree of social affinity toward the poor, whereas those for "externality goods" include self-interest motivations for addressing externalities (see Section A3 of the Supplementary Material for more).
Next, to measure racial tolerance, respondents were asked, "You would agree to one of your daughters or sons marrying a Black or darker-skinned person.To what extent do you agree or disagree with this statement?" In addition, respondents were also asked, second way, using responses to the campaign endorsement survey question as outcome measures to further test the robustness of the effects.Figure 6 presents the results using standard survey questions discussed above, whereas Figure 7 shows the results using responses to the campaign endorsement question.The results in Figure 7 mirror those in Figure 6.I include the estimated effect on fear of crime and concern for sewage discussed in the previous section as points of comparison here.The results show that while class-based integration increases fear of crime and concern for sewage, it has a negative effect on preferences for soup kitchens as well as that for daycares in slums (latter not plotted).In addition, integration has a positive, albeit statistically insignificant, effect on respondents' willingness to allow their child to marry someone of darker skin color (i.e., of Afro-Brazilian descent).Together, the results make clear that the spatial externalities mechanism cannot be conflated with a race effect.Rather, class-based integration has no effect on racial tolerance.In addition, the spatial externalities effect is empirically distinct from an altruism or social affinity mechanism.In fact, spatial proximity between socioeconomic groups causally generates aversion toward the poor.Social affinity from contact or a sorting effect, therefore, cannot explain the positive effect of classbased integration on preferences for collective public goods.The results support the claim that the observed effects of integration on public goods preferences run purely through self-interest motivations for reducing the externalities of inequality.In Section A6 of the Supplementary Material, I also use the mechanism experiments to conduct a causal mediation analysis of how each of these competing mechanisms mediates the effect of integration.

City-Level Public Goods Provision
The focus of this article is on explaining the formation of voters' preferences for public goods.The ways in which preferences get aggregated and map onto public goods provision is beyond the scope of this study.However, the broader implication of the theory is that socioeconomically integrated cities provide more public goods that benefit the poor.To confirm this observable implication at the city-level, I calculate a measure of the percent share of favela populations in each city with sewage collection services and with streetlights using Brazilian census data.Using the city-level version of the proposed instrumental variable, I instrument for the effect of city-level integration on these measures of public goods provision in slums.
The analysis confirms that socioeconomic integration increases both the extension of sewer lines and the provision of streetlights in favelas (Table 3).The size of the effect for streetlights is comparable to that for a 1-standard-deviation increase in integration.For sewer lines, the size of the effect is almost that for a 3-standard-deviation increase in integration.This set of results confirm that the micro-level spatial externalities mechanism that drives preference formation has broader observable implications for public goods provision at the city-level.Integrated cities, indeed, provide more for those living in informal slum settlements.

CONCLUSION
Across the developing world, cities of comparable fiscal capacity have vastly different amounts of public goods.This article builds on the large literature that seeks to explain this variation in three ways.First, beyond race or ethnicity, I advance a theory of how geographies defined by class identities affect distributive outcomes.Second, the distributive politics literature emphasizes supply-side theories of "top-down" provision at the expense of understanding voter demand for public goods.In this study, I collect an original database of preferences for public goods-the first of its kind-and develop a theory of how preferences for public goods form.Last, there is limited work that compares the effects of different mechanisms that link diversity or segregation to public goods.The article leverages a survey experiment design that adjudicates between the competing mechanisms of segregation.I introduce an unexplored mechanism that confounds the link between segregation and public goods: the spatial externalities of inequality.I highlight that in cities characterized by the integration (de-segregation) of slums, urban externalities, an understated feature of social welfare in cities, are viewed through a classicist lens as spatial externalities of inequality.Pairing a quasi-experimental research design with a large-scale household survey, I find that class-based integration (de-segregation) causally induces both the psychological and actual incidence of cross-class externalities, and as a result, middleclass preferences for the public provision of "externality goods."Integration reduces, instead, the perceived relative efficacy of private alternatives (e.g., personal firearms and private guards) to the public good.Therefore, while segregation polarizes the urban electorate, the spatial integration of class groups can align preferences across class cleavages.Contrary to the conventional wisdom that diversity undermines public goods, I illustrate a form of cooperation between class-and potentially even racialout-groups for public goods.The shared risk of welfare loss forges an interdependency between social class groups in integrated localities, obliging cooperation for collective public goods.
A core policy implication is that urban segregation encourages the privatization of urban services and, therefore, undermines support for the collective public good.While the empirical referent here is Latin America, a context in which class trumps race as the dominant sociopolitical cleavage, the concept applies broadly also to race-or ethnicity-salient settings that are, likewise, socioeconomically unequal.For example, although Alesina, Baqir, and Easterly (1999) find that racial diversity is negatively associated with public goods in the racially charged context of the United States, they note that certain types of public goods, such as policing, are a curious exception. 20And while this study has focused on developing regions, historically, fear of infectious diseases from the poor also drove the extension of public goods to the rookeries during the development of cities in Victorian England (Wohl 1983).This article, thus, raises questions about the extent to which the spatial externalities mechanism enabled political coalitions for public goods across space and time.In addition, geography-based politics is driven by a multiplicity of identities based on class, racial, sectoral, territorial, or even purely partisan ties.Future work could probe the crosscutting effects of these competing geographies on both the formation and representation of group-based preferences.

FIGURE 2 .
FIGURE 2. Brasília, the Federal District Equating blackness with poverty in Brazil reflects the social reality that darker-skinned Brazilians are disproportionately among the country's very poor

FIGURE 4 .
FIGURE 4. The Mechanisms of Integration (Reduced Segregation)

"
Thinking of neighborhood in which you live, to what extent are you concerned with (affected by) the effects of residing near open sewerage?"

TABLE 1 .
2SLS Estimations: Preferences for Public Goods and Private Alternatives 2SLS models estimated both with and without baseline controls (see Sections A4 and A5 of the Supplementary Material) and with and without respondent-level and neighborhood-level demographic controls to avoid bias from conditioning on concomitant variables.I instead show balance on these variables in Section A11.4 of the Supplementary Material.Standard errors in parentheses.*p < 0:1, ** p < 0:05, *** p < 0:01. Note:

TABLE 2 .
2SLS Estimations: Spatial Externalities of Inequality 2SLS models estimated both with and without baseline controls (see Section A4 of the Supplementary Material).The models exclude respondent-level and neighborhood-level demographic controls to avoid bias from conditioning on concomitant variables.I instead show balance on these variables in Section A11.4 of the Supplementary Material.Standard errors in parentheses.* p < 0:1 , ** p < 0:05 , *** p < 0:01. Note: "The mixture of races is good for Brazil.To what extent do you agree or disagree with this statement?"Bothquestionsareborrowedfrom the LAPOP public opinion survey.I, once again, instrument for the effects of integration on the survey responses.As discussed in the research design, I also measure the mechanisms a See TableA21in the Supplementary Material.See TableA22in the Supplementary Material.

TABLE 3 .
Effects of Integration on Streetlights and Sewer Lines in Favelas The models control for the two components of the instrument (i.e., the predicted migration SSIV and "hilliness") and include robust standard errors.See TableA20in the Supplementary Material for full model results.Standard errors in parentheses.* p < 0:1, ** p < 0:05, *** p < 0:01. Note: