Statistical Mechanics of Collective Behavior applied to a Schelling Segregation Model