Example of how Simpson’s paradox can influence the identification of interspecific interactions. a We randomly generated microbial landscapes with underlying spatial heterogeneity in habitat quality and then simulated competition between two OTUs using a spatially explicit gLV model with local dispersal. b After 60 generations, the populations had reached global equilibria. c From these gridded populations, we can see that the interspecific Pearson’s correlation coefficients, when controlled for habitat type, show the true negative correlations. However, correlations measured using samples taken from these landscapes (here, the solid lines bisecting panel a), result in erroneous estimates of interspecific correlations. d To assess the generality of this finding, we repeated this simulation exercise 1000 times across a variety of different habitat configurations and found that, on average, the sample-scale interspecific correlation coefficients (dashed line) do not have the same sign as the true, local-scale coefficients (solid line). Methods and code are provided in the supplementary information