Computing class specific statistics