当前位置:首页 > 培训职业 > 正文

如何理解并区分统计学中percentile,quantile,quartile的概念

quantile=分位数

quartile=四分位数 percentile=百分位数

纯计算的角度看,三个量的特殊值关系如下

0th quartile = 0th quantile = 0th percentile = min负无穷远点

1st quartile = .25th quantile = 25th percentile = lower quartile下四分位数(中点以下,又取中点)

2nd quartile = .5th quantile = 50th percentile = median中点/中位数

3rd quartile = .75th quantile = 75th percentile = upper quartile上四分位数(中点以上,又取中点)

4th quartile = 1st quantile = 100th percentile = max无穷远点

(修改自 Percentile vs quantile vs quartile)

中位数,四分位数和百分位数都是quantile的特例

从实用的角度,可以说

中位数只有一个

四分位数有三个:下四分位数,中位数,上四分位数

百分位数有99个(太多,不是都有名字)

-------------------------------下面用Mathematica代码举个粒子----------------------------

考虑标准正态分布

用Quantile[]分位数函数来求四分位数可以这样写:

1st 四分位数(下四分位数)记为Q1

2nd 四分位数(中位数)记为Q2

3rd 四分位数(上四分位数)记为Q3

Q1 = Quantile[NormalDistribution[],1/4] (*约为-0.674*)

Q2 = Quantile[NormalDistribution[],2/4] (*标准正态分布,中位数为0*)

Q3 = Quantile[NormalDistribution[],3/4] (*约为0.674*)

4th 四分位数(没实际意义):

Quantile[NormalDistribution[],4/4] (*无穷大*)

求百分位数可以这样写:

1th 百分位数:

Quantile[NormalDistribution[],1/100]

nth 百分位数:

Quantile[NormalDistribution[],n/100]

PS:

Quartiles[]函数可以直接给出一个概率分布的四分位数列表{Q1,Q2,Q3}

对于百分位数列表,mma是没有内置Percentiles[]函数的,实际用处不大

多重随机标签

猜你喜欢文章