四分位数(Quartile)应用于统计学中的箱线图绘制,是统计学中分位数的一种,即把所有数值由小到大排列并分成四等份,处于三个分割点位置的数值就是四分位数。第三四分位数与第一四分位数的差距又称四分位距(InterQuartile Range,IQR)。对于四分位数的确定,有不同的方法,另外一种方法基于N-1 基础。Excel 中有两个四分位数的函数。以上引文中,w代表分位数位置,y代表位置的整数部分,z代表位置的分数部分

概念

第一四分位数 (Q1),又称“较小四分位数”,等于该样本中所有数值由小到大排列后第25%的数字。

第二四分位数 (Q2),又称“中位数”,等于该样本中所有数值由小到大排列后第50%的数字。

第三四分位数 (Q3),又称“较大四分位数”,等于该样本中所有数值由小到大排列后第75%的数字。

第三四分位数与第一四分位数的差距又称四分位距(InterQuartile Range,IQR)。

示例

首先确定四分位数的位置:

Q1的位置= (n+1) × 0.25

Q2的位置= (n+1) × 0.5

Q3的位置= (n+1) × 0.75

n表示项数

对于四分位数的确定,有不同的方法,另外一种方法基于N-1 基础。即

Q1的位置=1+(n-1)x 0.25

Q2的位置=1+(n-1)x 0.5

Q3的位置=1+(n-1)x 0.75

Excel 中有两个四分位数的函数。QUARTILE.EXC 和QUARTILE.INC

QUATILE.EXC 基于 N+1 的方法,QUARTILE.INC基于N-1的方法。

引证:1.minitab软件自带“公式与方法”(methods and formulas)

内,关于第一四分位数的原文如下:

1st quartile (Q1)

Twenty-five percent of your sample observations are less than or equal to the value of the first quartile. Therefore, the first quartile is also referred to as the 25th percentile. Q1 is calculated as follows:

let

w = (N+1)/4

y = the truncated integer value of w

z = the fraction component of w that was truncated away

Q1 = x(y) + z(x(y+1) - x(y))

Note: when w is an integer, y = w, z = 0, and Q1 = x(y)

关于第三四分位数的原文如下:

3rd quartile (Q3)

Seventy-five percent o