这一章学什么?

1. 一些很简单的统计数据:Mean, Median, Mode, Percentiles, Variance, Standard Deviation

2. 用数据描述图形的形状:z-score, skewness

3. 最后的两个变量之间的 Covariance 和 Correlation Coefficient。

这三个方面都是为以后的章节打下基础。

If the measures are computed for data from a sample, they are called sample statistics.

If the measures are computed for data from a population, they are called population parameters.


3.1 Measure of Location

Sample Mean :

Population Mean:

Median:Arrange the data in ascending order (smallest value to largest value).

(a) For an odd number of observations, the median is the middle value.

(b) For an even number of observations, the median is the average of the two middle values.

Mode:The mode is the value that occurs with greatest frequency.

Percentiles: The pth percentile is a value such that at least p percent of the observations are less than or equal to this value and at least (100-p) percent of the observations are greater than or equal to this value. 第 p 的 percentiles 是至少 p%的数据是小于等于这个值的,而且 至少100-p 的值是大于或者等于这个值。

怎么计算 Percentile ?

Step 1. Arrange the data in ascending order (smallest value to largest value).

Step 2. Compute an index i= p/100 *n  where p is the percentile of interest and n is the number of observations.

Step 3. (a) If i is not an integer, round up. The next integer greater than i denotes the position of the pth percentile.

(b) If i is an integer, the pth percentile is the average of the values in po- sitions i and i+1.

如果计算出 i 不是一个整数,那么就 round up,下一个数字就是第 p 的 pencentile。

如果计算出 i 是一个整数,那么第 p 的 pencentile 就是 第 i个数据和第 i+1个数据的平均数

Quartiles:  Q1 = first quartile, or 25th percentile   Q2 = second quartile, or 50th percentile (also the median)  Q3 = third quartile, or 75th percentile

3.2 Measures of Variability

Range = Largest Value - Smallest Value

Interquartile Range = IQR = Q3 - Q1

Population Variance: σ2 = Σ ( Xi - X )2 / N

Sample Variance: s2 = Σ ( xi - x )2 / ( n - 1 )

Why Sample Variance is n-1?

因为用 n 的时候,计算出来的方差会偏小,所以用 n-1,具体过程还可以用数学证明,具体见:https://www.zhihu.com/question/20099757

Sample standard deviation: s = sqrt [ Σ ( xi - x )2 / ( n - 1 ) ]

Population standard deviation: σ = sqrt [ Σ ( Xi - X )2 / N ]

Coefficient of Variation = (standard deviation/ Mean) * 100% 这个数字可以用来比较不同数据集中数据的变化程度 (Variability)


3.3 Measures of Distribution Shape, Relative Location, and Detective Outliers

1. Distribution Shape

Skewed Left (Skewness <0 ), median > mean

Skewed Right (Skewness >0), mean > median

Symmetric  (Skewness = 0), mean = median

2. Z-score: 

determine how far a particular value is from the mean  Zi = (Xi -X)/s

The z-score, zi , can be interpreted as the number of standard deviations xi is from the meanX


3. CHEBYSHEV’S THEOREM 

At least (1-1/z2) of the data values must be within z standard deviations of the mean, where z is any value greater than 1.

4. Empirical Rule

For data having a bell-shaped distribution:

• Approximately 68% of the data values will be within one standard deviation of the mean.

• Approximately 95% of the data values will be within two standard deviations of the mean.

• Almost all of the data values will be within three standard deviations of the mean.

5. Detecting Outliers

we recommend treating any data value with a z-score less than 3 or greater than 3 as an outlier.

3.4 Exploratory Data Analysis

1. Five Number Summary

  1. Smallest value

  2. First quartile (Q1)

  3. Median (Q2)

  4. Third quartile (Q3)

  5. Largest value

2. Box Plot

3.5 Measures of Association Between two variables

Sample Covariance

Population Covariance: 

第一象限和第三象限才是正向的

Covariance 也有局限性,第一,数值结果会变得很大,最好能变成[-1,1]的区间,第二,当把 x 由米转成厘米的时候,结果应该是一样的。

所以要用到:Correlation Coefficient

Correlation Coefficient: 这个的范围是从 -1到1,The correlation coefficient ranges from 1 to 1. Values close to 1 or 1 indicate a strong linear relationship. The closer the correlation is to zero, the weaker the relationship.


3.6 The Weighted Mean and Working with Grouped Data

1. Weighted Mean

2. Grouped Data

重学statistics,Cha3 Descriptive Statistics: numerical measures相关推荐

  1. R语言数据描述性统计(Descriptive statistics)实战:数据全局描述信息、数值数据的描述性统计(Numerical data)、离散型数据的描述性统计(Categorical)

    R语言数据描述性统计(Descriptive statistics)实战:数据全局描述信息.数值数据的描述性统计(Numerical data).离散型数据的描述性统计(Categorical) 目录

  2. 概率论与数理统计 1 Overview and Descriptive Statistics(概述和描述性统计) (上篇)

    概率论_1.1_1.2 1.1 Populations,Samples,and Processes Branches of Statistics the Scope of Modern Statist ...

  3. pandas使用groupby函数和describe函数计算不同分组的描述性统计(descriptive statistics of each group in dataframe)

    pandas使用groupby函数和describe函数计算不同分组的描述性统计(descriptive statistics of each group in dataframe) 目录

  4. R语言编写自定义描述统计计算函数、使用doBy包的summaryBy函数计算不同分组(group)的描述性统计值(Descriptive statistics by group、样本个数、均值、标准)

    R语言编写自定义描述统计计算函数.使用doBy包的summaryBy函数计算不同分组(group)的描述性统计值(Descriptive statistics by group using summa ...

  5. 什么是描述性统计分析( descriptive statistics)?主要包含哪些内容?

    什么是描述性统计分析( descriptive statistics)?主要包含哪些内容? 描述统计是通过图表或数学方法,对数据资料进行整理.分析,并对数据的分布状态.数字特征和随机变量之间关系进行估 ...

  6. 描述统计学(descriptive statistics)

    描述统计学(descriptive statistics)是一门统计学领域的学科,主要研究如何取得反映客观现象的数据,并以图表形式对所搜集的数据进行处理和显示,最终对数据的规律.特征做出综合性的描述分 ...

  7. 【笔记】重学前端-winter

    本文为:winter 发布在极客时间 [重学前端]系列课程的的笔记和总结 支持正版哦: https://time.geekbang.org/col... 导语 如果深入进去了解,你会发现,表面上看他们 ...

  8. 重学JavaScript深入理解系列(一)

    JavaScript深入理解--执行上下文(Execution Context) 定义 每当控制器到达ECMAScript可执行代码的时候,控制器就进入了一个执行上下文. 执行上下文(简称:EC) 以 ...

  9. 重学前端-学习笔记-JavaScript对象

    说明 重学前端是程劭非(winter)在极客时间开的一个专栏,在此主要整理我的学习笔记.如有侵权,请联系我,谢谢. javascript对象特征 对象具有唯一标识性:完全相同的两个对象,也不是同一个对 ...

  10. 重学hadoop技术

    最近因为做了些和hadoop相关的项目(虽然主要是运维),但是这段经历让我对hadoop的实际运用有了更加深入的理解. 相比以前自学hadoop,因为没有实战场景以及良好的大数据学习氛围,现在回顾下的 ...

最新文章

  1. ov5640帧率配置_一文看懂赛博朋克2077中低配置的设置方法和能畅玩的电脑有哪些?...
  2. VMWARE workstation导致母机反应变慢的现象
  3. sealos kubernetes(k8s)高可用安装教程
  4. SDNU 1416.一元三次方程求解(数学)
  5. 安卓mysql插入数据_【11-25求助】关于Android 的SQLite数据库插入数据报错问题
  6. 在python中函数和类都属于可调用对象_在Python中函数和类都属于可调用对象
  7. html5 ios cookie,iOS设置cookie到web遇到的坑
  8. git新建账号_github 账号创建
  9. Java8时间转换(LocalDateTime)代码实例
  10. 微信小程序开发--【Hello World 及代码结构】(二)
  11. 500G JAVA视频网盘分享 JEECG开源社区
  12. 软考-软件工程师常用公式及知识点
  13. java连接mysql lookup_Java数据库连接池lookup用法
  14. GitHub 之 上传文件(一)
  15. 如何与新同事共同成长?
  16. 人工智能、深度学习、机器学习常见面试题83~100
  17. 《鸟哥的Linux私房菜》第四版辅助文档
  18. PTA——日K蜡烛图
  19. iOS开发——网络连接判断
  20. 中山起湾周边学校有计算机吗,【趣味数据】乐有家:入学对口小区一直变?中山东区入学住哪里比较好...

热门文章

  1. c 语言可以直接调用max,c语言宏定义函数如何调用
  2. vm虚拟机安装lede旁路由_Vmware虚拟机安装LEDE实现软路由openwrt
  3. Vue--基础模板语法以及计算属性
  4. C语言各数据类型所占内存空间大小
  5. oracle11g跟踪,Oracle 11g DRCP连接跟踪配置
  6. 2055040-79-2,Acid-PEG5-TEMPO具有末端羧酸和TEMPO部分的PEG连接剂
  7. Canvas: trying to draw too large bitmap 红米 k30 奔溃
  8. 相关性分析:Pearson、Kendall、Spearman
  9. Windows下Pycharm专业版2021.2以及Anaconda安装教程
  10. Cisco交换机与路由器登陆密码破解(保存原配置)