Analysis of baseball teams