The Statistical Mechanics Of Biodiversity