1.t-test的功能:单因素二水平的假设检验。

H0:与我们想过要的结果相反的假设,比如我们想要的是两组数据的差异性,那么这个假设是:两组数据没有差异性。

H1或Ha:备择假设,与H0假设相反。

2.t-test的前提:正态性和方差齐性

3.R中的t-test的使用。

t.test(x, y = NULL,alternative = c("two.sided", "less", "greater"),mu = 0, paired = FALSE, var.equal = FALSE,conf.level = 0.95, ...)

或 t.test(formula, data, subset, na.action, ...)

> data
druga drugb > t.test(data$druga,data$drugb) Welch Two Sample t-test data: data$druga and data$drugb
t = -8.1742, df = 5.5846, p-value = 0.0002598
alternative hypothesis: true difference in means is not equal to
percent confidence interval:
-11.417221 -6.082779
sample estimates:
mean of x mean of y
10.75 19.50
> df
drug effect > t.test(effect~drug,data=df) Welch Two Sample t-test data: effect by drug
t = -8.1742, df = 5.5846, p-value = 0.0002598
alternative hypothesis: true difference in means is not equal to
percent confidence interval:
-11.417221 -6.082779
sample estimates:
mean in group mean in group
10.75 19.50

结果解读:

t:t统计值。

df:自由度。

p:H0假设成立的概率。

最新文章

  1. js精简写倒计时函数
  2. poj 1269 线段相交/平行
  3. php 加密解密方法2
  4. ul ol dl
  5. MYSQL 体系结构图-LRU
  6. Linux企业级项目实践之网络爬虫(16)——使用base64传输二进制数据
  7. python图片小爬虫
  8. 通过IP或socket获取对方的MAC地址
  9. 使用Spring Boot快速构建基于SQLite数据源的应用
  10. [Swift]LeetCode529. 扫雷游戏 | Minesweeper
  11. Python变量之白首如新,倾盖如故
  12. Debian 系linux切换登录管理器(display manager)
  13. 吴恩达机器学习笔记31-梯度检验(Gradient Checking)
  14. keras用vgg16做图像分类
  15. 使用fabric2打包部署文件
  16. PHP获取文件大小的方法详解
  17. git fail to push some refs....
  18. HTML5中的Canvas详解
  19. servlet3.0
  20. 配置Gitlab使用LDAP认证

热门文章

  1. HTTP 请求:GET vs. POST
  2. python django -4 模板
  3. c#文件路径的获取
  4. head&&tail
  5. mybatis基础,mybatis配置文件核心组件typeAliases元素
  6. IOS 多线程的一些总结
  7. 用训练好的caffemodel对单个/批量图片进行分类
  8. web容器 web服务器 servlet/jsp容器 之间的区别和关系是什么?
  9. Genealogical tree
  10. Strange Optimization(扩展欧几里得)