独立t检验和配对t检验

There’s a neat YouTube channel I discovered a couple of years ago where Eugene O’Loughlin, Ph.D., does some statistical analyses by hand. I thought it was neat because it allows us to see that statistical analysis is not something that only computers can do. Sure, computers can do these analyses much faster than we ever could, but you really can do a lot with just a pen and paper and a good calculator.

几年前,我发现了一个整洁的YouTube频道 ,其中Eugene O'Loughlin博士是 ,手动进行一些统计分析。 我认为这很整洁,因为它使我们看到统计分析不是只有计算机才能完成的事情。 当然,计算机可以比以往更快的速度进行这些分析,但是实际上,您只需笔和纸以及一个好的计算器就可以完成很多工作。

Of course, you need some knowledge of numbers and how they work, and the basic statistical concepts that will help you get the work done, but there’s not much else after that. For example, here is Dr. O’Loughlin doing a paired t-test by hand:

当然,您需要一些数字及其工作方式的知识,以及可以帮助您完成工作的基本统计概念,但是在此之后没有太多其他知识了。 例如,这是O'Loughlin博士手工进行的配对t检验:

Paired t tests are used to test the theory that the average score of a test taken by one group is different (or the same) as the average score of another test taken by the same group. (One group, two tests… Paired.) Now that you’ve seen the video on how to do it by hand, how can you do it in R in a way that teaches you how the base t.test function works internally?

配对t检验用于检验以下理论:一组考试的平均分数与同一组另一考试的平均分数不同(或相同)。 (一组,两个测试…配对。)现在,您已经观看了有关如何手动执行视频的视频,如何在R中以教您基本t.test函数如何在内部工作的方式进行视频处理?

First, The Things You’ll Need to Know

首先,您需要知道的事情

Using Dr. O’s data set up there and his example, we know that we need to know the differences between the tests, the square of the differences, and the sum of the differences and the sum of the squared differences. We also need to know the degrees of freedom (number of pairs minus 1) and then go get the critical value of the t score from a table.

使用O博士在那里设置的数据和他的示例,我们知道我们需要知道测试之间的差异,差异的平方,差异的总和以及差异的平方和。 我们还需要知道自由度(对数减去1),然后从表中获得t分数的临界值。

That’s it… So let’s do it in code:

就是这样...所以让我们在代码中完成它:

# First, the pre-lesson scores:pre <- c(23,25,28,30,25,25,26,25,22,30,35,40,35,30)# Then, the post-lesson scores:post <- c(35,40,30,35,40,45,30,30,35,40,40,35,38,41)# What are the average scores?pre.avg <- mean(pre)post.avg <- mean(post)

Here, I’ve created the pre and post datasets. Then I went ahead and calculated the average for each set. The average score in the post set is higher than the average score in the pre set, but is that difference statistically significant? Let’s calculate the values we need:

在这里,我创建了前后数据集。 然后我继续计算每组的平均值。 帖子集中的平均分数高于预设中的平均分数,但是这种差异在统计上是否显着? 让我们计算所需的值:

# Differences between the setsdifferences <- pre-post # Pre minus post# Sum of differences between the sets:sum.differences <- sum(differences)# Square the differencesdifferences.sqrd <- differences^2# Sum of the squared differences:sum.sqrd.differences <- sum(differences.sqrd)# Sum of differences squared:sum.differences.sqrd <- sum.differences^2# Number of observation pairsn.obs <- as.integer(length(pre))

Now, we have everything we need to know to calculate the t score:

现在,我们拥有计算t分数所需的所有知识:

t.score= sum.differences / sqrt(  (((n.obs*sum.sqrd.differences)-(sum.differences.sqrd))/     (n.obs - 1)  ))# Your t score isView(t.score)

You’ll see that the t score is the same as Dr. O calculated, so our conclusion is the same. Of course, you can do this much faster in R:

您会看到t分数与O博士计算的相同,因此我们的结论是相同的。 当然,您可以在R中更快地执行此操作:

t.test(pre, post, paired = TRUE, alternative = "two.sided")# The alternative is "two.sided" because we're hypothesizing that the two# sets are different. If we were hypothesizing that the true difference in# means was greater or less than zero, we would use "greater" or "less" in# the alternative statement.t.test(pre,post, paired = TRUE, alternative = "less")

And that’s it. You’ve done a paired t test in R the long way and the short way, but now you know how the short way arrives at the calculation that you do by hand and via the short way.

就是这样。 您已经在R和长途中用R完成了配对的t检验,但是现在您知道了短途如何通过手工和短途完成计算。

It is essential for you to know how these functions work “under the hood” because there may come a time when someone programming those functions makes a mistake. Do you really want your work to hinge on how someone else — someone you may not even know — does their proofreading of their code?

对您来说,了解这些功能如何“在后台”工作非常重要,因为有时可能有人对这些功能进行编程会出错。 您是否真的希望您的工作取决于其他人(您甚至可能不认识的人)如何对其代码进行校对?

I didn’t think so.

我不这么认为。

René F. Najera, MPH, DrPH, is a doctor of public health, an epidemiologist, amateur photographer, running/cycling/swimming enthusiast, father, and “all around great guy.” You can find him working as an epidemiologist a local health department in Virginia, grabbing tacos at your local taquería, or on the campus of the best school of public health in the world where he is an associate in the Epidemiology department. All the opinions in this blog post are those of Dr. Najera and do not necessarily represent those of his employers, friends, family or acquaintances.

RenéF. Najera,公共卫生硕士,博士 ,是一名 公共卫生 医生,流行病学家, 业余摄影师 ,跑步/骑自行车/游泳爱好者,父亲和“周围的好人”。 您可以找到他在弗吉尼亚州的一个地方卫生部门担任流行病学家,在您当地的taquería或世界上最好的公共卫生学院的校园里抓玉米饼,在那里他是流行病学部门的助理。 本博客文章中的所有观点均为纳杰拉博士的观点,不一定代表他的雇主,朋友,家人或相识者的观点。

翻译自: https://medium.com/swlh/whats-under-the-hood-of-a-paired-student-s-t-test-87db028e28b4

独立t检验和配对t检验


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

相关文章:

  • 配对和非配对t检验的差异
  • python配对t检验_T检验第二篇(SPSS,SAS,R,Python) 配对T检验
  • R语言如何做配对t检验?
  • 配对t检验的应用条件是什么_配对t检验在实际工作中的应用
  • python 配对t检验_配对t检验的python实现
  • 必须使用javadoc形式的注释
  • java 数组定义是必须指定长度吗
  • matlab出现错误使用 / 矩阵维度必须一致
  • 解决:元素内容必须由格式正确的字符数据或标记组成。
  • 【MATLAB】报错:数组索引必须为正整数或逻辑值
  • c++报错:表达式必须含有常量值
  • Linux安装必须建立的三个分区
  • C++ 表达式必须含有常量值变量
  • java实现接口必须实现所有方法吗_我们是否必须在实现Java接口的类中实现所有方法?...
  • C++字符串常量总结(包含表达式必须是可修改的左值问题)
  • matlab取值只能为整数,运行时提示Size 输入必须为整数
  • error C4716 必须返回一个值 处理
  • mysql表必须有主键吗_SQL中的每一张表都必须设有主键吗
  • java main()方法必须都写在类里面
  • 抽象类是不是必须要有抽象方法
  • c语言表达式必须包含指针类型,c – 错误:表达式必须是指向完整对象类型的指针(?)...
  • html 规定输入框必须输入
  • c语言程序规定必须用main作为,C语言学习必须清楚的事情,这就是C语言的开始...
  • python爬取京东商品图片_Python---爬取京东商城的图片
  • Python—Scrapy爬取京东商城
  • android京东源码下载,京东商城APP - 源码下载|通讯/手机编程|android开发|源代码 - 源码中国...
  • Centos下安装FastDFS
  • hadoop fs,hadoop dfs以及hdfs dfs区别
  • springboot + vue + FastDFS实现文件上传(支持预览)
  • py笔记.字典的使用

独立t检验和配对t检验_配对学生的t检验是什么?相关推荐

  1. python 样本均值t检验_假设检验与单样本T检验(上)

    假设检验与单样本T检验(上)假设检验与单样本T检验(上)假设检验与单样本T检验(上) 响应输出 大多数情况,我们不需要关注Response对象本身,只需要在控制器的操作方法中返回数据即可. 最简单的响 ...

  2. java配对碱基链_配对碱基链

     [描述] 脱氧核糖核酸(DNA)由两条互补的碱基链以双螺旋的方式结合而成.而构成DNA的碱基共有4种,分别为腺瞟呤(A).鸟嘌呤(G).胸腺嘧啶(T)和胞嘧啶(C).在两条互补碱基链的对应位置上 ...

  3. python t检验_讲讲统计学中T检验的种类

    这一篇给大家介绍一下T检验的种类以及具体的Python实现代码.T检验是比较两个均值差异的,不同种类T检验的差别其实在于均值的计算差异. 1.单样本T检验 单样本T检验是用来检验一组样本的均值A与一个 ...

  4. python怎么实现检验_用python进行KS检验

    简介 Kolmogorov-Smirnov test(KS检验)是一种重要的非参数检验方法,应用非常广泛,比如之前介绍的数据库CMap,其核心算法就是借鉴KS检验. KS检验是一种统计检验方法,其通过 ...

  5. 基于python的异方差检验_讲讲异方差的检验

    我们前面讲了异方差,也讲了怎么用图示法来判断是否有异方差,这一篇来讲讲怎么用统计的方法来判断有没有异方差. 关于检验异方差的统计方法有很多,我们这一节只讲比较普遍且比较常用的white test(怀特 ...

  6. 配对t检验的应用条件是什么_配对t检验的适用条件,独立样本T检验、配对T检...

    提起配对t检验的适用条件,大家都知道,有人问配对样本T检验的假设前提是什么,另外,还有人想问t检验的应用条件是什么,你知道这是怎么回事?其实两独立样本T检验的适用范围是什么,下面就一起来看看独立样本T ...

  7. python配对t检验_置信度计算——t检验(配对样本t检验,AB实验置信度),T

    为什么计算置信度? 在推荐场景下,我们会研发一些策略,来提升业务指标,在做AB实验的时候,实验组跟base组的指标对标,并非稳定的胜利或者稳定的失败,观察7天或者14天的指标数据,会有正有负,那么怎么 ...

  8. graphpad两组t检验_手把手教你用 GraphPad 做配对样本 t 检验

    在统计学分析里,最重要的元素是数据,因为数据的属性决定了用什么样的方式来比较数据,不同的数据比较方式就决定了统计分析方法以及对应的统计图. Graphpad prism 8.0是一款强大统计分析软件, ...

  9. SAS学习笔记25 t检验(单个样本t检验、配对样本t检验、两个独立样本t检验及方差不齐时的t'检验)...

    根据研究设计和资料的性质有单个样本t检验.配对样本t检验.两个独立样本t检验以及在方差不齐时的t'检验 单样本t检验 单样本t检验(one-sample t-test)又称单样本均数t检验,适用于样本 ...

  10. spss数据分析(平均值检验、单样本的t检验、两独立样本的t检验、配对样本的t检验)

    统计方法分为描述统计和推断性统计,参数估计和假设性检验是推断性统计中的重要部分. 参数检验主要用于抽样研究方法,从总体中抽取一定的样本进行研究 非参数性检验:无法准确假设时 在用样本均值估计总体均值, ...

最新文章

  1. pycharm打开python文件如何自动创建项目_pycharm 怎么自动创建python头文件?
  2. 学python先学什么-学Python之前,什么最重要?
  3. Codeforces Round #344 (Div. 2)C. Report
  4. POJ1719行列匹配
  5. 如何理解通配符类型参数/协变性/逆变性?
  6. php底层开发框架, yaf,swoole,hiphop
  7. Yarn和SparkAlone对比
  8. java 计时器_【java内存】内存结构
  9. vim 的复制粘贴剪切
  10. 如何免费下载百度文库文章
  11. 仿Hex-Editor,实现简单地二进制文件查看器JHexer
  12. win10 环境下Excel的MySQL ODBC驱动下载及安装
  13. HttpModule 与 Globle.asax
  14. Windows Server 2016 身份管理 (MCSA 认证 70-742)-李海园-专题视频课程
  15. 波士顿科学完成从霸菱亚洲收购科医人外科业务;刘孟元博士加盟克睿基因 | 医药健闻...
  16. Python到底能做什么
  17. Java中什么时候用接口,什么时候用抽象类
  18. 随记随提可行性分析报告
  19. 儿童护眼灯哪个品牌好?精选最好的儿童护眼灯
  20. C++使用OCC读取igs文件时路径为中文时,无法读取的问题

热门文章

  1. python导入模块不存在_基于pycharm导入模块显示不存在的解决方法
  2. 中国莽草酸行业市场深度调查报告(2022版)
  3. Python 将汉字转为拼音
  4. 移动端旅游电商靠什么吸引了金主?
  5. html打包成apk wex5,WeX5打包部署学习
  6. wex5 php开发,WeX5开发移动APP(SQLite本地数据优化)
  7. 美团2021校招笔试-编程题题解
  8. qos 流控功能_QOS流量控制管理详解!
  9. chloe.mysql 源码_AceFx-基于Nfine的Chloe官网及后台源码
  10. Chloe.Orm多表连接查询 (二)