Average test grade calculation