----- Original Message -----From: Larry GranilloSent: Saturday, May 23, 2009 6:41 PMSubject: [baseball-databank] Determining StandingsWhat is the actual algorithm for determining how many games behind a team is on a given date? I mean, I can do it in my head, but I'd like to be able to do it programatically.
I found a thread on Google Answers with some details (http://answers.google.com/ ). It describes the formula as:answers/threadvi ew?id=234414
(1/2) * ((WA - WB) + (LB - LA))
That looks to be spot on to me, especially considering the way MLB.com describes "Games Behind": 'GB - Games behind, the average of the differences between the leading team wins and the trailing team wins, and the leading team losses and trailing team losses'
Can someone confirm this is right? Is this how Baseball Reference does it? And, if so, what's the answer to the question at the end of the Google Answers thread: if Team A is 2-0 and Team B is 5-1, who is in first place? do we go by Games Behind or Winning PCT?
Thanks for the help.
Larry
http://www.wezen-ball.com