IQR 四分位距计算器(三种方法、五数概括、离群值)Interquartile Range Calculator (Three Methods, Five-Number Summary, Outliers)
输入一组数据,求 Q1、Q3 和四分位距 IQR,可选三种常用算法(线性插值包含端点,同 Excel QUARTILE.INC;不含端点,同 QUARTILE.EXC;Tukey 中位数分半法)。同时给出五数概括、1.5 × IQR 离群值界限和找到的离群值。本地处理。Enter a data set to get Q1, Q3 and the interquartile range with one of three common methods (inclusive interpolation as in Excel QUARTILE.INC, exclusive as in QUARTILE.EXC, or Tukey median of halves), plus the five-number summary, the 1.5 × IQR outlier fences and any outliers found. Processed locally.
使用说明与常见问题How-to & FAQ
「四分位距计算器(三种方法、五数概括、离群值)」是什么?What is the Interquartile Range Calculator (Three Methods, Five-Number Summary, Outliers) tool?
输入一组数据,求 Q1、Q3 和四分位距 IQR,可选三种常用算法(线性插值包含端点,同 Excel QUARTILE.INC;不含端点,同 QUARTILE.EXC;Tukey 中位数分半法)。同时给出五数概括、1.5 × IQR 离群值界限和找到的离群值。本地处理。Enter a data set to get Q1, Q3 and the interquartile range with one of three common methods (inclusive interpolation as in Excel QUARTILE.INC, exclusive as in QUARTILE.EXC, or Tukey median of halves), plus the five-number summary, the 1.5 × IQR outlier fences and any outliers found. Processed locally.
如何使用「四分位距计算器(三种方法、五数概括、离群值)」?How do I use the Interquartile Range Calculator (Three Methods, Five-Number Summary, Outliers) tool?
在「四分位距计算器(三种方法、五数概括、离群值)」中,填写「数据(空格或逗号分隔)」、「算法」等参数,结果会随输入实时计算并显示在下方。In the Interquartile Range Calculator (Three Methods, Five-Number Summary, Outliers): Fill in "Data (space or comma separated)", "Method"; results are recalculated instantly as you type.
为什么不同软件算出的四分位数不同?Why do programs give different quartiles?
四分位数有多种定义。Excel 的 QUARTILE.INC 和 R 默认用包含端点的线性插值;QUARTILE.EXC 不含端点;很多教科书用中位数把数据分成两半再各取中位数(Tukey 法)。数据量大时差别很小。Quartiles have several definitions. Excel QUARTILE.INC and the R default use inclusive interpolation, QUARTILE.EXC excludes the ends, and many textbooks split the data at the median and take the median of each half (Tukey). The differences shrink with more data.
离群值怎么判断?How are outliers flagged?
常用 Tukey 规则:小于 Q1 − 1.5 × IQR 或大于 Q3 + 1.5 × IQR 的数据视为可能的离群值。这只是筛查,是否删除要结合实际情况。The usual Tukey rule flags values below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR as possible outliers. It is a screen; whether to drop them depends on context.
IQR 有什么用?What is the IQR used for?
IQR 是中间 50 % 数据的跨度,不受极端值影响,适合描述偏态数据的离散程度,也是箱线图中箱子的长度。The IQR is the spread of the middle 50 % of the data. It ignores extreme values, suits skewed data and is the length of the box in a box plot.
能举个计算实例吗?Can you show a worked example?
例如在「四分位距计算器(三种方法、五数概括、离群值)」中填 数据(空格或逗号分隔) = 1 2 3 4 5 6 7 8,算法 = 线性插值(包含端点,Excel INC),结果区显示:Q1:2.75;Q3:6.25;IQR = Q3 − Q1:3.5;五数概括:1, 2.75, 4.5, 6.25, 8;离群值界限:-2.5 … 11.5;离群值:无;n:8For example, entering Data (space or comma separated) = 1 2 3 4 5 6 7 8, Method = Interpolated, inclusive… in the Interquartile Range Calculator (Three Methods, Five-Number Summary, Outliers) gives: Q1: 2.75; Q3: 6.25; IQR = Q3 − Q1: 3.5; Five-number summary: 1, 2.75, 4.5, 6.25, 8; Outlier fences: -2.5 … 11.5; Outliers: None; n: 8
有哪些选项可以调整?What options can I adjust?
「四分位距计算器(三种方法、五数概括、离群值)」的设置:「数据(空格或逗号分隔)」默认 1 2 3 4 5 6 7 8;「算法」可选 线性插值(包含端点,Excel INC)、线性插值(不含端点,Excel EXC)、中位数分半(Tukey)(默认 线性插值(包含端点,Excel INC))。每次生成结果都按当前设置处理。Settings in the Interquartile Range Calculator (Three Methods, Five-Number Summary, Outliers) — "Data (space or comma separated)" default 1 2 3 4 5 6 7 8; "Method": Interpolated, inclusive (Excel INC), Interpolated, exclusive (Excel EXC), Median of halves (Tukey) (default Interpolated, inclusive (Excel INC)). The result always uses the current settings.
计算精度如何?How precise are the results?
「四分位距计算器(三种方法、五数概括、离群值)」使用 JavaScript 双精度浮点数(约 15–16 位有效数字);极大或极小的数值可能存在精度误差。The Interquartile Range Calculator (Three Methods, Five-Number Summary, Outliers) uses double-precision floating point (about 15–16 significant digits); very large or very small values may lose precision.
「四分位距计算器(三种方法、五数概括、离群值)」免费吗?需要注册吗?Is the Interquartile Range Calculator (Three Methods, Five-Number Summary, Outliers) free? Do I need an account?
「四分位距计算器(三种方法、五数概括、离群值)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Interquartile Range Calculator (Three Methods, Five-Number Summary, Outliers) is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.