The use of ecological studies in explaining the relationship between deprivation and ill-health is widespread in many health applications. However, inferences drawn from these studies about individuals are susceptible to serious bias known as the ecological fallacy. Our paper demonstrates the ecological fallacy effect in this context but also shows how it can be considerably reduced by taking into account different population structures at the aggregate level. Two regression analyses of limiting long-term illness are performed, one at the individual level and one at the electoral ward level, using the 1991 UK census sample of anonymized records and the small area statistics. The analyses compare several measures of deprivation including the standard Carstairs index, with the separate variables which make up the indices, to determine their effectiveness in explaining rates of illness. Two of the deprivation scores are constructed using latent variable modelling techniques which enable a score to be generated at the individual level as well as at the ward level. It is shown that, given the right choice of socioeconomic variables and taking into account the age structure of the population, it should be possible to construct a single aggregate deprivation index that will explain most of the variation in rates of illness across the study region.