The percentile of a number in a vector

Is there a built-in function that finds the percentile of a number in a vector?

1 Like

(Deleted because I misunderstood the question)

I think you want something like the percentile function in StatsBase.jl? (Most of the statistics functions in Julia are in packages.)

Or do you want something like percent(x, v) = 100 * count(<(x), v) / length(v), i.e. the percent of elements of v that are < x?

5 Likes

6 posts were split to a new topic: Opposite of StatsBase.percentile