Percentile和Quartile
要介绍这两个概念,需要先介绍一个简单的概念;中值(median)。
中值简单的说,就是一堆给定的数字,最中间的值;
例如:1,2,3,4,5的中值就是3;
1,2,3,4的中值就是2.5;
引入数学公式就是:
If n is odd then Median (M) = value of ((n + 1)/2)th item term.
If n is even then Median (M) = value of [((n)/2)th item term + ((n)/2 + 1)th item term ]/2
http://en.wikipedia.org/wiki/Median
什么是quartile呢?quartile的意思是四分位数,second quartile就是中值;
四分位数,从字面上看是四个数字将一堆数分割开来,对,就是分割;
第一个四分位数(Q1),也叫做25th percentile或者lower quartile;
第二个四分位数(Q2),也叫做中值或者50th percentile;
第三个四分位数(Q3),也叫做75th percentile或者upper quartile;
interquartile range(IQR),IQR=Q3-Q1;
四分位数的计算方法有很多,下面是从wikipedia复制过来的。
Method 1
- Use the median to divide the ordered data set into two halves. Do not include the median in either half.使用中值将有序的数据集分成两部分,这两部分不包括中值
- The lower quartile value is the median of the lower half of the data. The upper quartile value is the median of the upper half of the data.Q1就是小数据部分的中值,Q3就是大数据的中值
Method 2
- Use the median to divide the ordered data set into two halves. If the median is a datum (as opposed to being the mean of the middle two data), include the median in both halves.使用中值将有序的数据集分成两部分,数据集的个数的奇数的话,将中值加入到分成的两部分的末尾和头
- The lower quartile value is the median of the lower half of the data. The upper quartile value is the median of the upper half of the data.和方法1一样
Method 3
- If there are an even number of data points, then the method is the same as above.如果数据集是偶数的话,同上;
- If there are (4n+1) data points, then the lower quartile is 25% of the nth data value plus 75% of the (n+1)th data value; the upper quartile is 75% of the (3n+1)th data point plus 25% of the (3n+2)th data point.如果数据集是4n+1个的话,Q1=Set[n]*25%+Set[n+1]*75%;Q3=Set[3n+1]*75%+Set[3n+2]*25%
- If there are (4n+3) data points, then the lower quartile is 75% of the (n+1)th data value plus 25% of the (n+2)th data value; the upper quartile is 25% of the (3n+2)th data point plus 75% of the (3n+3)th data point.如果数据集是4n+3个的话,Q1=Set[n+1]*75%+Set[n+2]*25%; Q3=Set[3n+2]*25%+Set[3n+3]*75%
Example 1
Ordered Data Set: 6, 7, 15, 36, 39, 40, 41, 42, 43, 47, 49
Method 1 | Method 2 | Method 3 |
---|---|---|
Example 2
Ordered Data Set: 7, 15, 36, 39, 40, 41
As there are an even number of data points, all three methods give the same results.
Method 1 | Method 2 | Method 3 |
---|---|---|
需要一提的是,如果数据比Q1-1.5*IQR小,比Q3+1.5*IQR大的话,我们称之为outiler(异常值)
http://en.wikipedia.org/wiki/Quartile
什么是percentile呢?percentile的意思是百分位数,50th percentile就是中值;25th percentile就是Q1;
percentile怎样计算呢?
例如:
First worked example of the Nearest Rank method
Consider the ordered list {15, 20, 35, 40, 50}, which contains five data values. What are the 30th, 40th, 50th and 100th percentiles of this list using the Nearest Rank method?
Percentile P |
Number in list N |
Ordinal rank n |
Number from the ordered list that has that rank |
Percentile value |
Notes |
---|---|---|---|---|---|
30th | 5 | the second number in the ordered list, which is 20 | 20 | 20 is an element of the list | |
40th | 5 | the second number in the ordered list, which is 20 | 20 | In this example it is the same as the 30th percentile. | |
50th | 5 | the third number in the ordered list, which is 35 | 35 | 35 is an element of the ordered list. | |
100th | 5 | Last | 50, which is the last number in the ordered list | 50 | The 100th percentile is defined to be the largest value in the list, which is 50. |
http://en.wikipedia.org/wiki/Percentile
Percentile和Quartile相关推荐
- excel取整函数_Excel中的这些烧脑问题,你遇到过几种?
小伙伴们好啊,前几天分享的中级篇介绍了几种容易造成公式错误的情况. 今天和大家来分享高级篇,高级篇嘛,当然是以烧脑为主,介绍一些在论坛和QQ群困扰了很多人的公式错误原因. 1,EDATE和EOMONT ...
- oracle的sum函数精度问题_Excel中的这些烧脑问题,你遇到过几种?
小伙伴们好啊,前几天分享的中级篇介绍了几种容易造成公式错误的情况. 今天和大家来分享高级篇,高级篇嘛,当然是以烧脑为主,介绍一些在论坛和QQ群困扰了很多人的公式错误原因. 1,EDATE和EOMONT ...
- 论文细读:HOLMES:Real-time APT Detection through Correlation of Suspicious Information Flows
HOLMES:基于可疑信息流关联的实时APT检测 Abstract 在本文中,我们介绍了Holmes系统,它实现了一种新的检测高级和持续性威胁(APT)的方法.Holmes的灵感来自于现实世界APT的 ...
- 计算机excel求四分位数,如何在Excel中计算一组数字的百分位数和四分位数?
如何在Excel中计算一组数字的百分位数和四分位数? 在我们的日常学习或工作中,您可能需要根据一些标准计算特定的数字. 例如,对于一组收入,找到30%输入的收入的数字要比显示的屏幕截图要少的工作是什么 ...
- cognos学习笔记
cognos学习笔记 第一部分 准备知识 概述 (p1) 业务智能(Business Intelligence) 近年来业务智能的话题开始在国内热起来. 业务智能是在计算机应用水平达到一 ...
- 标记偏见_如何(巧妙地)扭曲视觉效果以支持您的偏见叙事
标记偏见 Data is important - it is the logical justification for world-changing decisions. Unfortunately ...
- 关于百分位数(percentile)
下面是百分位数的小结. 文章目录 百分位数的含义 常用的百分位数 百分位数的应用 百分位数通则 百分位数法 BMI指数的制定 参考资料 百分位数的含义 百分位数(percentile) 统计学中的常用 ...
- Oracle quartile函数,Oracle分析函数六——数据分布函数及报表函数
Oracle 分析函数--数据分布函数及报表 函数CUME_DIST功能描述:计算一行在组中的相对位置, CUME_DIST 总是返回大于 0 .小于或等于 1 的数,该数表示该行在 N 行中的位置. ...
- np.percentile()函数超详解 异常值极端值百分位四分位数
20211115 当有空值存在时,四分位数会是空值 20211019 https://www.zhihu.com/question/58421946 https://baike.baidu.com/i ...
- 在Python中计算一次性计算多个百分位数percentile、quantile
在Python中计算一次性计算多个百分位数percentile. quantile 目录 在Python中计算一次性计算多个百分位数percentile. quantile
最新文章
- injectionForXcode代码注入步骤
- 简单而又常用的基本的交换路由的一些配置命令
- 培训第二弹:全国大学生智能汽车竞赛百度竞速组预告
- 无限级菜单 mysql设计_无限级菜单简单的设计
- python os 文件操作 getcwd()方法
- perl python ruby_perl,lua,python,ruby的对比(3) -- lambda,closure,proper tail function call
- pytorch学习笔记(4):tensorboard可视化
- java歌词高亮显示滚动_js如何处理音乐播放器的歌词文件达到高亮以及滚动的效果?...
- 01_Flume基本架构及原理
- [转]Visual Studio 各版本区别
- linux 按序号创建文件夹,在Linux终端中创建M3U播放列表的方法
- python treeview控件使用详解_python绘图工具turtle库的使用详解
- C# BackgroundWorker使用讲解
- python pymysql模块下载_python开发11之PyMySQL模块
- Tedddby Activator V5.1,免费绕过iOS 14.7Beta,支持iCloud登录
- 一、计算机网络的作用和认识互联网
- 天下无贼是假的,天下无票倒是真的;如来神掌是假功夫,能买到车票才是真功夫。
- Tcl学习0——Tcl和Tk介绍
- 大学计算机专业英语期末考试,河南大学计算机专业英语试题
- C语言笔记第02章:三大基本结构