FunctionRacerProblemsRace

Outlier Count

EasyNumPyPython

A value is an outlier if it is more than k standard deviations away from the mean, that is |x - mean| > k * std, using the population standard deviation (np.std). Return how many outliers nums has.

Example 1

nums [10,10,10,10,10,10,10,10,10,100]
k 2
returns 1

Only the 100 is far from the mean.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More NumPy problems