- 中位数一般化即为分位数,表征顺序排列的一组数中,百分之多少对应的点
- 如中位数,50%对应的点;1/4分位数,25%对应的点
def quantile(x,p):
p_index = int(p*len(x))
return sorted(x)[p_index]
def quantile(x,p):
p_index = int(p*len(x))
return sorted(x)[p_index]
本文标题:分位数quantile
本文链接:https://www.haomeiwen.com/subject/fzfeottx.html
网友评论