Using both numerical simulations and analytical methods, we investigate how
the stability of ecological communities depends on the number of species t
hey contain. To investigate complex communities, we construct communities f
rom modular "subcommunities" that can have arbitrary community structure; e
.g. subcommunities could consist of pairs of predator and prey species, tri
os of prey, specialist predator and generalist predator, or any collection
of interacting species. By building entire communities from subcommunities,
we can change the number of species in the community without changing comm
unity structure. We further suppose that species sharing the same ecologica
l role in different subcommunities act additively on the per capita populat
ion growth rates of other species. Under these assumptions, the interaction
s between species from different subcommunities have no effect on community
-level stability, measured by the variability in the combined densities of
species sharing the same ecological role in different subcommunities. Furth
ermore, increasing species richness (i.e. the number of subcommunities comp
rising the community) increases community-level stability only when it intr
oduces species that respond differently to environmental fluctuations. Ther
efore, our results support the "insurance hypothesis" that species richness
increases community-level stability by insuring that some species in a com
munity are tolerant of different environmental fluctuations.