数据统计 测试方法

This post is not meant for seasoned statisticians. This is geared towards data scientists and machine learning (ML) learners & practitioners, who like me, do not come from a statistical background.

Ť他的职位是不是意味着经验丰富的统计人员。 这是针对数据科学家和机器学习(ML)学习者和从业者的 ,他们和我一样,并非来自统计背景。

For a person being from a non-statistical background the most confusing aspect of statistics, are the fundamental statistical tests, and when to use which test?. This post is an attempt to mark out the difference between the most common tests and the relevant key assumptions.

对于一个非统计学背景的人来说,统计方面最令人困惑的方面是基本统计检验 ,以及何时使用哪种检验? 这篇文章是试图指出最常见的测试和相关的关键假设之间的差异。

目录 (Table of contents)

  1. Terminologies: (KEY TERMINOLOGIES FOR THIS POST)

    术语:( 此职位的主要术语)

  2. Statistical Test(Hypothesis Testing)统计检验(假设检验)
  3. Statistical Assumptions统计假设
  4. Parametric tests参数测试
  5. Parametric test Flowchart参数测试流程图
  6. Dealing with non-normal distributions (Non-Parametric tests)处理非正态分布(非参数检验)

1)术语: (1) TERMINOLIGIES:)

独立变量和独立变量 (DEPENDENT AND INDEPENDENT VARIABLES)

An independent variable often called “predictor variable”, is a variable that is being manipulated in order to observe the effect on a dependent variable, sometimes called an outcome/output variable.

通常被称为“预测变量”的自变量是为了观察对因变量的影响而被操纵的变量,有时称为结果/输出变量。

  • Independent variable(s)-> Predictor variable(s)自变量->预测变量
  • Dependent variable(s) -> Outcome/Output variable(s)因变量->结果/输出变量

变量类型 (TYPES OF VARIABLES)

It is important to distinguish the difference between the type of variables because this plays a key role in determining the correct type of statistical test to adopt. There are two main categories:

区分变量类型之间的差异非常重要,因为这在确定要采用的正确统计检验类型中起着关键作用。 主要有两个类别:

  • QUANTITATIVE: express the amounts of things (e.g. the number of cigarettes in a pack). The two different types of quantitative variables are:

    数量 : 表达物品的数量(例如,一包香烟的数量)。 两种不同类型的定量变量是:

  1. CONTINOUS (a.k.a Ratio): is used to describe measures and can usually be divided into units smaller than one (e.g. 1.50 kg).

    连续 (又称比率 ):用于描述度量,通常可以划分为小于一的单位(例如1.50千克)。

  2. DISCRETE (a.k.a Interval): is used to describe counts and usually can’t be divided into units smaller than one (e.g. 1 cigarette).

    DISCRETE (又名Interval ):用于描述计数,通常不能分为小于1的单位(例如1支香烟)。

  • CATEGORICAL: express groupings of things (e.g. the different type of fruits). The three different types of categorical variables are:

    类别 : 表达事物的分组(例如,不同类型的水果)。 三种不同类型的类别变量是:

  1. ORDINAL: represent data with an order (e.g. rankings).

    序数表示具有顺序的数据(例如排名)。

  2. NOMINAL: represent group names (e.g. brands or species names).

    名词代表组名(例如品牌或品种名称)。

  3. BINARY: represent data with a yes/no or 1/0 outcome (e.g. LEFT or RIGHT).

    BINARY :表示结果为是/否或1/0的数据(例如,左或右)。

TYPES OF VARIABLES SUMMARY (Image by author)
变量类型摘要(作者提供)

2)统计测试 (2) STATISTICAL TESTS)

Statistics is all about data. Data alone is not interesting. It is the interpretation of the data that we are interested in.

统计信息都是关于数据的。 单独的数据并不有趣。 它是对我们感兴趣的数据的解释。

In Statistics, one very important thing is statistical testing, if statistics “is the interpretation of the data”, statistical testing can be considered as the “formal procedure for investigating our ideas about the world”.

在统计中,非常重要的一件事是统计测试,如果统计“是对数据的解释”,则统计测试可以被视为“调查我们对世界的看法的正式程序”。

In other words, whenever we want to make claims about the distribution of data or whether one set of results are different from another set of results, data scientists must rely on hypothesis testing.

换句话说,每当我们要对数据的分布或一组结果是否与另一组结果有所不同时,数据科学家必须依靠假设检验。

假设检验 (HYPOTHESIS TESTING)

Using Hypothesis Testing, we try to interpret or draw conclusions about the population using sample data, evaluating two mutually exclusive statements about a population to determine which statement is best supported by the sample data.

使用“ 假设检验” ,我们尝试使用样本数据来解释或得出有关总体的结论,评估关于总体的两个互斥陈述,以确定样本数据最能支持哪种陈述。

假设检验有五个主要步骤: (THERE ARE FIVE MAIN STEPS IN HYPOTHESIS TESTING:)

Step 1) State your hypothesis as a Null (Ho) and Alternate (Ha) hypothesis.

步骤1)将您的假设陈述为零(Ho)和替代(Ha)假设。

Step 2) Choose a significance level (also called alpha or α).

步骤2)选择显着性水平(也称为alpha或α)。

Step 3) Collect data in a way designed to test the hypothesis.

步骤3)以旨在检验假设的方式收集数据。

Step 4) Perform an appropriate statistical test: compute the p-value and compare from the test to the significance level.

步骤4)执行适当的统计检验:计算p值,然后将检验与显着性水平进行比较。

Step 5) Decide whether to “ REJECT ” the null hypothesis(Ho) or “ FAIL TO REJECT ” the null hypothesis(Ho).

步骤5)决定是“拒绝”无效假设(Ho)还是“失败”无效假设(Ho)。

Note: Though the specific details might vary, the procedure you will use when testing a hypothesis will always follow some version of these steps.

注意 :尽管具体细节可能有所不同,但是在检验假设时将使用的过程将始终遵循这些步骤的某些版本。

If you want to further understand hypothesis testing, I would highly recommend these two great posts on Hypothesis testing.

如果您想进一步了解假设检验,我强烈推荐有关假设检验的这两篇好文章。

3)统计假设 (3) STATISTICAL ASSUMPTIONS)

Statistical tests make some common assumptions about the data being tested (If these assumptions are violated then the test may not be valid: e.g. the resulting p-value may not be correct)

统计测试对要测试的数据做出一些通用假设(如果违反了这些假设,则该测试可能无效:例如,得出的p值可能不正确)

  1. Independence of observations: the observations/variables you include in your test should not be related(e.g. several tests from a same test subject are not independent, while several tests from multiple different test subjects are independent)

    观察结果的独立性 :您包含在测试中的观察值/变量不应该相关(例如,来自同一测试对象的多个测试不是独立的,而来自多个不同测试对象的多个测试是独立的)

  2. Homogeneity of variance: the “variance” within each group is being compared should be similar to the rest of the group variance. If a group has a bigger variance than the other(s) this will limit the test’s effectiveness.

    方差的同质性 :比较每个组中的“方差”应与其余组方差相似。 如果组的方差大于其他方,这将限制测试的有效性。

  3. Normality of data: the data follows a normal distribution, normality means that the distribution of the test is normally distributed (or bell-shaped) with mean 0, with 1 standard deviation and a symmetric bell-shaped curve.

    数据的正态性 :数据遵循正态分布,正态性表示测试的分布呈正态分布(或钟形),平均值为0,标准差为1,钟形曲线对称。

source: https://studylib.net/doc/10831020/the-bell-curve-the-standard-normal-bell-curve
来源: https : //studylib.net/doc/10831020/the-bell-curve-the-standard-normal-bell-curve

4)参数测试 (4) PARAMETRIC TESTS)

Parametric tests are the ones that can only be run with data that stick with the “three statistical assumptions” mentioned above. The most common types of parametric tests are divided into three categories.

参数测试是只能使用符合上述“三个统计假设”的数据运行的测试。 最常见的参数测试类型分为三类。

回归测试: (Regression tests:)

These tests are used test cause-and-effect relationships, if the change in one or more continuous variable predicts change in another variable.

如果一个或多个连续变量的变化预示着另一个变量的变化则将这些检验用于检验因果关系

  • Simple linear regression: tests how a change in the predictor variable predicts the level of change in the outcome variable.

    简单线性回归:测试预测变量的变化如何预测结果变量的变化水平。

  • Multiple linear regression: tests how changes in the combination of two or more predictor variables predict the level of change in the outcome variable

    多元线性回归:测试两个或多个预测变量组合的变化如何预测结果变量的变化水平

  • Logistic regression: is used to describe data and to explain the relationship between one dependent (binary) variable and one or more nominal, ordinal, interval or ratio-level independent variable(s).

    Logistic回归:用于描述数据并解释一个(二元)变量与一个或多个名义,有序,区间或比率级别的自变量之间的关系。

比较测试: (Comparison tests:)

These tests look for the difference between the means of variables:Comparison of Means.

这些测试寻找变量均值之间的差异:均值比较。

  • T-tests are used when comparing the means of precisely two groups (e.g. the average heights of men and women).

    在精确比较两组的平均值(例如,男性和女性的平均身高)时,使用T检验

  • Independent t-test: Tests the difference between the same variable from different populations (e.g., comparing dogs to cats)

    独立t检验 :测试来自不同人群相同变量之间的差异 (例如,比较狗和猫)

  • ANOVA and MANOVA tests are used to compare the means of more than two groups or more(e.g. the average weights of children, teenagers, and adults).

    ANOVAMANOVA检验用于比较两组或以上两组的均值(例如,儿童,青少年和成人的平均体重)。

关联测试: (Correlation tests:)

These tests look for an association between variable checking whether two variables are related.

这些测试在变量之间寻找关联,检查两个变量是否相关。

  • Pearson Correlation: Tests for the strength of the association between two continuous variables.

    皮尔逊相关:测试两个连续变量之间关联的强度。

  • Spearman Correlation: Tests for the strength of the association between two ordinal variables (it does not rely on the assumption of normally distributed data)

    Spearman相关性:测试两个序数变量之间的关联强度(它不依赖于正态分布数据的假设)

  • Chi-Square Test: Tests for the strength of the association between two categorical variables.

    卡方检验:测试两个类别变量之间的关联强度。

PARAMETRIC TESTS SUMMARY( Image by Author)
参数测试摘要(作者提供)

5)流程图:选择参数测试 (5) FLOWCHART: CHOOSING A PARAMETRIC TEST)

This flowchart will help you choose among the above described parametric tests. For nonparametric alternatives, check the following section.

该流程图将帮助您在上述参数测试中进行选择。 对于非参数替代,请检查以下部分。

PARAMETRIC TEST Flowchart (Image by author)
参数测试流程图(作者提供)

6)处理非正态分布 (6) DEALING WITH NON- NORMAL DISTRIBUTIONS)

Although the normal distribution takes centre part in statistics, many processes follow non-normal distributions. Many datasets naturally fit a non-normal model:

尽管正态分布在统计中占据中心位置,但是许多过程遵循非正态分布。 许多数据集自然适合于非正常模型:

-The number of accidents tends to fit a “Poisson distribution”

-事故数量趋于符合“泊松分布”

-The Lifetimes of products usually fit a “Weibull distribution”.

-产品的使用寿命通常符合“威布尔分布”。

非正态分布的示例 (Example of Non-Normal Distributions)

  1. Beta Distribution.Beta发行版。
  2. Exponential Distribution.指数分布。
  3. Gamma Distribution.伽玛分布。
  4. Inverse Gamma Distribution.反伽玛分布。
  5. Log-Normal Distribution.对数正态分布。
  6. Logistic Distribution.物流配送。
  7. Maxwell-Boltzmann Distribution.Maxwell-Boltzmann分布。
  8. Poisson Distribution.泊松分布。
  9. Skewed Distribution.分布偏斜。
  10. Symmetric Distribution.对称分布。
  11. Uniform Distribution.均匀分布。
  12. Unimodal Distribution.单峰分布。
  13. Weibull Distribution.威布尔分布。

那么,我们如何处理非正态分布? (Well then, How do we deal with non-Normal-Distributions?)

When your data is supposed to fit a normal distribution but doesn’t, we could do a few things to handle them:

当您的数据应该符合正态分布但不符合正态分布时,我们可以做一些事情来处理它们:

  • We may still be able to run parametric tests if your sample size is large enough (usually over 20 items) and try to interpret the results accordingly.如果您的样本量足够大(通常超过20个项目),我们仍然可以运行参数测试,并尝试相应地解释结果。
  • We may choose to transform the data with different statistical techniques, forcing it to fit a normal distribution.我们可能选择使用不同的统计技术来转换数据,迫使其适应正态分布。
  • If the sample size is small, skewed or if it represents another distribution type, you might run a non-parametric test.

    如果样本量小,偏斜或代表其他分布类型,则可以运行非参数检验

非参数测试 (Non-Parametric Tests)

Non-parametric tests (figure below) don’t make as many assumptions about the data and are useful when one or more of the three statistical assumptions are violated.

非参数检验(下图)对数据的假设不多,当违反三个统计假设中的一个或多个时很有用。

Note that: The inferences that non-parametric tests make aren’t as strong as the parametric tests.

请注意:非参数测试的推论不如参数测试强。

NON- PARAMETRIC TESTS(Image by author)
非参数测试(作者提供)

Hope you find this post informative and useful. Please let me know if you have any feedback. Thanks a lot for reading!

希望您发现这篇文章有益和有用。 如果您有任何反馈意见,请告诉我。 非常感谢您的阅读!

翻译自: https://towardsdatascience.com/statistical-testing-understanding-how-to-select-the-best-test-for-your-data-52141c305168

数据统计 测试方法


http://www.taodudu.cc/news/show-994963.html

相关文章:

  • 每个Power BI开发人员的Power Query提示
  • a/b测试_如何进行A / B测试?
  • 面向数据科学家的实用统计学_数据科学家必知的统计数据
  • 在Python中有效使用JSON的4个技巧
  • 虚拟主机创建虚拟lan_创建虚拟背景应用
  • python 传不定量参数_Python中的定量金融
  • 贝叶斯 朴素贝叶斯_手动执行贝叶斯分析
  • GitHub动作简介
  • 照顾好自己才能照顾好别人_您必须照顾的5个基本数据
  • 认识数据分析_认识您的最佳探索数据分析新朋友
  • arima模型怎么拟合_7个统计测试,用于验证和帮助拟合ARIMA模型
  • 天池幸福感的数据处理_了解幸福感与数据(第1部分)
  • 詹森不等式_注意詹森差距
  • 数据分析师 需求分析师_是什么让分析师出色?
  • 猫眼电影评论_电影的人群意见和评论家的意见一样好吗?
  • ai前沿公司_美术是AI的下一个前沿吗?
  • mardown 标题带数字_标题中带有数字的故事更成功吗?
  • 使用Pandas 1.1.0进行稳健的2个DataFrames验证
  • rstudio 关联r_使用关联规则提出建议(R编程)
  • jquery数据折叠_通过位折叠缩小大数据
  • 决策树信息熵计算_决策树熵|熵计算
  • 流式数据分析_流式大数据分析
  • 数据科学还是计算机科学_数据科学101
  • js有默认参数的函数加参数_函数参数:默认,关键字和任意
  • 相似邻里算法_纽约市-邻里之战
  • 数据透视表和数据交叉表_数据透视表的数据提取
  • 图像处理傅里叶变换图像变化_傅里叶变换和图像床单视图。
  • 滞后分析rstudio_使用RStudio进行A / B测试分析
  • unity3d 可视化编程_R编程系列:R中的3D可视化
  • python 数据科学 包_什么时候应该使用哪个Python数据科学软件包?

数据统计 测试方法_统计测试:了解如何为数据选择最佳测试!相关推荐

  1. 数据科学与大数据排名思考题_排名前5位的数据科学课程

    数据科学与大数据排名思考题 目录 (Table of Contents) Introduction介绍 Udemy乌迪米 Machine Learning A-Z™: Hands-On Python ...

  2. 软件开发向大数据开发过渡_如果您是过渡到数据科学的开发人员,那么这里是您的最佳资源...

    软件开发向大数据开发过渡 by Cecelia Shao 邵Ce It seems like everyone wants to be a data scientist these days - fr ...

  3. 大数据相关从业_如何在组织中以数据从业者的身份闪耀

    大数据相关从业 Build bridges, keep the maths under your hat and focus on serving. 架起桥梁,将数学放在脑海中,并专注于服务. 通过协 ...

  4. 大数据平台构建_如何像产品一样构建数据平台

    大数据平台构建 重点 (Top highlight) Over the past few years, many companies have embraced data platforms as a ...

  5. 数据数据泄露泄露_通过超参数调整进行数据泄漏

    数据数据泄露泄露 介绍 (Introduction) Data Leakage is when the model somehow knows the patterns in the test dat ...

  6. 导入数据中文乱码_基于Navicat和Kettle的数据迁移完全解读(多图)

    需求描述 对于数据分析人员来说,工作的基础是数据,没有数据分析就无从谈起,即巧妇难为无米之炊. #数据库# #数据迁移# #Oracle# 然而,数据分析往往在实验环境或者准生产环境中开展,而数据分布 ...

  7. 易语言mysql数据同步程序_易语言mssql和mysql数据自动同步源码

    易语言mssql和mysql数据自动同步源码 易语言mssql和mysql数据自动同步源码 系统结构:RefreshTask,ComputeEndTime,ComputeOneTime,Compute ...

  8. 本月与上月对比数据叫什么_财务人事应会Excel数据对比Vlookup函数快速核定变动...

    如何对多列数据进行对比!说到多列数据的对比,其实说难也不难,说简单也不简单,在学习之前需要带大家认识一位新朋友VLOOKUP,赶紧一起来看看吧! 在上次的学习中,我们了解到可以使用合并计算功能,实现单 ...

  9. 数据存储方式_详解西门子S7-200PLC的数据区

    (一)数字量输入和输出映象区 1.输入映象寄存器(数字量输入映象区)(I) 数字量输入映象区是S7-200CPU为输入端信号状态开辟的一个存储区.输入映像寄存器的标识符为I,在每个扫描周期的开始,CP ...

最新文章

  1. socket 读取 所有 数据 java_Java Socket 读取服务器端返回数据
  2. java关闭ie提示_java 关闭IE
  3. python基础指令-Python基础——与Python的指令交互
  4. 【Flask】Request和RequestParser类
  5. php申请证书,用phpstudy来申请SSL证书
  6. AutoCAD_acadiso.dwt卡死
  7. 开了立体声混音仍然不能内录_相位表是如何为你的混音工作带来帮助的
  8. BulkRen文件批量改名工具的一点点使用心得
  9. 老男孩Linux课程职场高薪秘籍
  10. python手机代码编辑器_Pycharm(Python代码编辑器) V2020.1.2 官方版
  11. Python实现键盘操作方法
  12. 电源线径大小与用电负荷的关系
  13. 关于antd table展开行expandable的坑和解决办法
  14. Day45. 数据分析实战(1):超市运营数据分析
  15. proftpd mysql_虚拟主机与Proftpd和MySQL(包括配额)在Ubuntu 8.04 LTS
  16. 28388-连接管理器 (CM)
  17. 燕十八 php经典,燕十八PHP传世经典第1部视频教程(后半部分)_PHP教程
  18. 防范网络钓鱼仍然很重要!
  19. 17、GATK使用简介 Part2/2
  20. 深度学习——损失函数推导过程(三个方面诠释损失函数的由来意义)

热门文章

  1. linux 同步IO: sync msync、fsync、fdatasync与 fflush
  2. CentOS 7 安装nginx
  3. 【C++学习笔记一】C++类和对象详解
  4. 我们究竟还要学习哪些Android知识?完整版开放下载
  5. bzoj 4300 绝世好题 —— 思路
  6. bzoj1095 [ZJOI2007]Hide 捉迷藏
  7. 初识spring-boot
  8. JVM源码---教你傻瓜式编译openjdk7(JAVA虚拟机爱好者必看)
  9. 如何实现一个教师与学生教学辅助平台?
  10. Python 拷贝对象(深拷贝deepcopy与浅拷贝copy)