The ethnic density effect entails that the concentration of ethnic minority people within an area might contribute to improved health outcomes once the negative effects of area deprivation are accounted for. This may be because ethnic density provides a platform for positive social conditions, such as increased support networks, a feeling of belonging, and reducing exposure to and buffering from racial victimization. However, recent research on the ethnic density has generated varied results and little to no conclusive evidence as to how the pathways operate. This thesis contributes by examining the potential mechanisms underlying the relationship between the ethnic density effect and racist victimization. Through the use of Agent-based models (ABM) this thesis sheds light on the details of a relevant mechanism operating between ethnic density and improved health outcomes. ABM is a computational method where environments, such as neighbourhoods, can be simulated and experimented with. Through simulating different scenarios ABM can provide new insights into the ethnic density effect. In this thesis, three models were produced with increasing complexity. The first model deals with the effect of ethnic density on racism, mainly through analysing the effect of the presence of ethnic minorities on prejudice, based on the contact theory developed by Allport (1954). In the first model, the number of ethnic minority individuals in neighbourhoods and the way in which they are concentrated were varied, in order to assess the effect of the spread of ethnic minorities on the prejudice of ethnic majorities, and the number of racist events experienced in the model. The second model adds in factors relating to deprivation, such as income and area deprivation. At the same time, there is some indication that deprivation influences racist behaviour and prejudice. This model, therefore, investigates whether these socio-economic factors have an influence on the amount of racism ethnic minorities experience and how this might influence the protective effects created by ethnic density. The third model seeks to explain how the interactions observed contribute to health and health inequalities between ethnic minority and ethnic majority individuals in the model. Factors such as the size of the ethnic minority population and the degree of segregation and income and deprivation were manipulated and controlled across simulation runs in order to understand the effects of these phenomena on potential health outcomes. The models in the thesis indicate that ethnic minority people in areas with higher levels of ethnic concentration experience fewer racist events, as they are protected from prejudiced individuals. However, those living outside these areas of high-density encounter more prejudiced individuals, and therefore experience more racial victimization. The increased levels of racial victimization mean that ethnic minority people living in richer areas have poorer health compared to those living in more deprived areas, once the effects of deprivation are accounted for. One of the main points this study brought forward is that the ethnic density effect does not occur if ethnic minorities are not sufficiently clustered. In the simulations where ethnic minorities were evenly spread across neighbourhoods, the effects of racism did not cause the same detrimental effect on the health of those living in richer areas, and it did not benefit those living in more deprived areas in the same manner.