Closed
Description
From https://discourse.julialang.org/t/median-vs-50th-quantile-giving-different-answers/18414/4
julia> x = [1; 4; 3; 2; 2.5; 7];
julia> w = [0.1;0.3;0.05;0.05;0.2;0.3];
julia> quantile(x, weights(w), 0.5)
3.5
but
julia> sum(w[x .<= 3.5]) >= 0.5
false
so 0.5
is not a median.
Metadata
Metadata
Assignees
Labels
No labels