ExcelHome技术论坛

 找回密码
 免费注册

QQ登录

只需一步,快速开始

快捷登录

搜索
EH技术汇-专业的职场技能充电站 妙哉!函数段子手趣味讲函数 Excel服务器-会Excel,做管理系统 效率神器,一键搞定繁琐工作
HR薪酬管理数字化实战 Excel 2021函数公式学习大典 Excel数据透视表实战秘技 打造核心竞争力的职场宝典
让更多数据处理,一键完成 数据工作者的案头书 免费直播课集锦 ExcelHome出品 - VBA代码宝免费下载
用ChatGPT与VBA一键搞定Excel WPS表格从入门到精通 Excel VBA经典代码实践指南
查看: 72504|回复: 20

请教:四分位数究竟怎么计算?

[复制链接]

TA的精华主题

TA的得分主题

发表于 2004-11-3 17:51 | 显示全部楼层 |阅读模式
为什么我算一个变量的四分位数,在spss和excel上分别计算的结果不一样,难道quartile的计算没有一个统一的公式吗?请各位能帮帮忙。分析的变量值见附件。 10ljVayS.rar (1.54 KB, 下载次数: 188)

TA的精华主题

TA的得分主题

发表于 2004-11-3 18:38 | 显示全部楼层
spss是什么啊?什么是四分位数?

TA的精华主题

TA的得分主题

发表于 2004-11-3 19:05 | 显示全部楼层

TA的精华主题

TA的得分主题

发表于 2004-11-3 19:31 | 显示全部楼层

TA的精华主题

TA的得分主题

发表于 2004-11-3 21:47 | 显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件       ★免费下载 ★       ★ 使用帮助

不懂,能不能先教一下,什么是四分数?

TA的精华主题

TA的得分主题

发表于 2004-11-4 00:55 | 显示全部楼层
QUARTILE(array,quart)和PERCENTILE(array,k)的结果是一样的,其中参数的对应关系是: quart=0,k=0;array中的最小值 quart=1,k=0.25;array中第一个四分位数(第 25 %排位) quart=2,k=0.5;array中分位数(第 50 个百分排位) quart=3,k=0.75;array第三个四分位数(第 75 个百分排位) quart=4,k=1;array中的最大值 关键是如果 k 不是 1/(n-1) (n为array中数值的个数)的倍数,函数 QUARTILE、PERCENTILE 使用插值法来确定第 k 个百分位数的值。

TA的精华主题

TA的得分主题

发表于 2004-11-4 02:18 | 显示全部楼层
微软知识库中的介绍,对计算原理进行了分析。

XL2000: Algorithm Used for QUARTILE() Function

This article was previously published under Q214072

SUMMARY

In Microsoft Excel 2000, the QUARTILE()function returns a specified quartile in an array of numeric values. QUARTILE() accepts two arguments: Array and Quart. Array is the range of values for which you want to find the quartile value. Quart indicates the value you want to return, where:

   0   Minimum value (Same as MIN())

   1   1st quartile - 25th percentile

   2   2nd quartile - 50th percentile (Same as MEDIAN())

   3   3rd quartile - 75th percentile

   4   4th quartile - 100th percentile (Same as MAX())

                

MORE INFORMATION

The following is the algorithm used to calculate QUARTILE():

1. Find the kth smallest member in the array of values, where:

k=(quart/4)*(n-1))+1

If k is not an integer, truncate it but store the fractional portion (f) for use in step 3. And where:

o

o quart = value between 0 and 4 depending on which quartile you want to find

o n = number of values in the array

2. Find the smallest data point in the array of values that is greater than the kth smallest -- the (k+1)th smallest member.

3. Interpolate between the kth smallest and the (k+1)th smallest values:

Output = a[k]+(f*(a[k+1]-a[k])) a[k] = the kth smallest a[k+1] = the k+1th smallest

Example

To find the third quartile in the array of values 0,2,3,5,6,8,9, follow these steps:

1. Find k and f:

k=TRUNC((3/4*(7-1))+1)=5 f=(3/4*(7-1))-TRUNC(3/4*(7-1))=.5

2. The fifth (kth) smallest value is 6, and the (5+1)th smallest value is 8.

3. Interpolate:

6+(.5*(8-6))=7

The information in this article applies to

Microsoft Excel 2000
[此贴子已经被作者于2004-11-4 2:19:37编辑过]

TA的精华主题

TA的得分主题

发表于 2004-11-4 11:11 | 显示全部楼层

TA的精华主题

TA的得分主题

 楼主| 发表于 2004-11-4 11:17 | 显示全部楼层

chengjun 版主,真是要感谢你啊。这么细致的分析已经使我十分清楚两者之间的差别了,excel和spss在计算公式上的确是不相同的,通过你的分析,我发现它们是用不同的方法计算k值的。真是受益啊!

TA的精华主题

TA的得分主题

发表于 2004-11-4 11:51 | 显示全部楼层

四分位数:将所有数值按大小顺序排列并分成四等份,处于三个分割点位置的得分就是四分位数。最小的四分位数称为下四分位数,所有数值中,有四分之一小于下四分位数,四分之三大于下四分位数。中点位置的四分位数就是中位数。最大的四分位数称为上四分位数,所有数值中,有四分之三小于上四分位数,四分之一大于上四分位数。

也有叫第25百分位数、第75百分位数的。

您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

手机版|关于我们|联系我们|ExcelHome

GMT+8, 2024-10-5 08:36 , Processed in 0.039684 second(s), 10 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 1999-2023 Wooffice Inc.

沪公网安备 31011702000001号 沪ICP备11019229号-2

本论坛言论纯属发表者个人意见,任何违反国家相关法律的言论,本站将协助国家相关部门追究发言者责任!     本站特聘法律顾问:李志群律师

快速回复 返回顶部 返回列表