fixing to return NaN instead of raising errors for extremely small n when not all stats are defined yet