Ad
  • Default User Avatar

    pls help, i got all test ok, exept 2: "27.99 should equal 27.98", "5.4 should equal 5.39". Get std and mean of sample -> create new_sample (remove outlier) -> check if len(sample) != len(new_sample) call clean_mean(new_sample, cutoff) -> return the result. For example with sample = [1.01, 0.99, 1.02, 1.01, 0.99, 0.97, 1.03, 0.99, 1.02, 0.99, 3, 10] and cutoff = 2 i call clean_mean 3 tiems (get rid of 10, 3, and return mean of [1.01, 0.99, 1.02, 1.01, 0.99, 0.97, 1.03, 0.99, 1.02, 0.99]