For OS/2 table versions >= 3, take the sum of the advancement widths (from the hmtx table) of each glyph, iff the advancement width is greater than zero. Do integer division of this sum by the number of glyphs that had an advancement width > 0.
For versions < 3, follow a similar procedure, but weight according to: http://www.microsoft.com/typography/otspec/os2ver2.htm#acw, and only consider lowercase latin characters for the average.