calculate top and bottom half summary using statmachine library