z检验与t检验比较区别.ppt_第1页
z检验与t检验比较区别.ppt_第2页
z检验与t检验比较区别.ppt_第3页
z检验与t检验比较区别.ppt_第4页
z检验与t检验比较区别.ppt_第5页
已阅读5页,还剩67页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

z检验与t检验 z test & t test,宇传华 yuchua ,Contents,1. z test z检验 2. One-sample t test 单样本t检验 3. Paired-samples t test 配对样本t检验 4. Two independent-samples t test 两独立样本t检验 5. test When variances of the two samples are heterogeneous 方差不齐时两样本均数 检验 6. Two type error in hypothesis test 假设检验中的两类错误,1. z test,z-distribution versus t-distribution,t,For very large samples, the t-test and z-test are identical,A sampling distribution for H0 showing the region of rejection for a = .05 in a 2-tailed z-test(双侧z检验),A sampling distribution for H0 showing the region of rejection for a = .05 in a 1-tailed z-test (单侧z检验),1. One-sample z test,A sampling distribution for H0 showing the region of rejection for a = .05 in a 2-tailed z-test(双侧z检验),72,2. Two independent-samples z test 两独立样本均数比较的z检验,例5-4 研究正常人与高血压患者胆固醇含量(mg%)的资料如下,试比较两组血清胆固醇含量有无差别。 正常人组 高血压组,1. 建立检验假设, 确定检验水平 ,即正常人与高血压患者血清胆固醇值总体均数相同; ,即正常人与高血压患者血清胆固醇值总体均数不同; = 0.05 2. 计算统计量z 值,3. 确定P 值, 作出推断结论 本例z =10.402.58,故P 0.01,按=0.05水准拒绝H0,接受H1,可以认为正常人与高血压患者的血清胆固醇含量有差别,高血压患者高于正常人。,A sampling distribution for H0 showing the region of rejection for a = .05 in a 2-tailed z-test(双侧z检验),43,在按“完全安装”模式安装后,“工具加载宏”添加分析工具,2. One-sample t test 单样本t检验,This test is used to check hypotheses about the fact that the mean of random variable X equals to given 0. 适用于样本均数与已知总体均数0的比较。0一般为标准值、理论值或经大量观察得到的较稳定的指标值。 Testing sample X should be a sample of a normal random variable. 检验样本是来自正态总体的随机样本 If X is not normal, t will have an unknown distribution and, strictly speaking, the t-test is inapplicable. However, according to the central limit theorem, as the sample size increases, the distribution of t tends to be normal. Therefore, if the sample size is big, we can use the t-test even if X is not normal. But there is no way to find out what value is big enough. This value depends on how X deviates from the normal distribution. Some sources claim that n should be greater than 30, but sometimes even this size is not enough. Alternatively, we can use non-parametric test: Wilcoxon rank-sign test.(见p79,第九章),3. 确定P值,做出推断结论 本例自由度n-135-134,查附表2,得t0.05/2,34=2.032。 因为t t0.05/2,34,故P0.05,表明差异无统计学意义,按 0.05水准不拒绝H0,根据现有样本信息,尚不能认为该地难产儿与一般新生儿平均出生体重不同。,1. 建立检验假设,确定检验水准 H0:0,该地难产儿与一般新生儿平均出生体重相同; H1:0,该地难产儿与一般新生儿平均出生体重不同; 0.05。 2. 计算检验统计量 在=0成立的前提条件下,计算统计量为:,例5.1 以往通过大规模调查已知某地新生儿出生体重为3.30kg.从该地难产儿中随机抽取35名新生儿作为研究样本,平均出生体重为3.42kg,标准差为0.40kg,问该地难产儿出生体重是否与一般新生儿体重不同? 解:0=3.30kg,未知,n=35为小样本,,S=0.40kg,故选用单样本t检验。,=TDIST(1.77,34,2),例5-1 结果图示,=0.05/2,P/2=0.086/2,Example,0 = 0.25 t0.05/2,9 =2.26 t0.05,9 =1.83,=TDIST(2.492,9,2)=0.0343,Excel 计算方法,Excel 计算方法(续),Excel result,SPSS计算方法,SPSS计算方法(续),SPSS result,应用条件,单个样本变量来自随机、独立的正态分布总体,3. Paired-samples t test 配对t检验,也叫Dependent t-test for paired samples 非独立样本t检验 This test is used when the samples are dependent; that is, when there is only one sample that has been tested twice (repeated measures) or when there are two samples that have been matched or “paired” 适用于非独立两样本的检验。如每一个个体被前后测量两次;或两组样本1:1配成对子(按每一对子的混杂因素(如年龄、性别)配对)。 The paired t-test assumes that the differences between pairs are normally distributed. If this assumption is violated, it would be better to use: Wilcoxon rank-sign test.(见p79,第九章),同源配对:同一受试对象作两次不同的处理,或一种处理的前后比较 异源配对:将受试对象按某些混杂因素(如性别、年龄、窝别等)配成对子,然后将每对中的两个个体随机分配给两种处理(如处理组与对照组) 优点:配对设计减少了比较对子间的个体差异。 特点:资料成对,每对数据不可拆分。,配对设计的两种情况,The number of doses of medication needed for asthma attacks before and after relaxation training,例5.2 有12名接种卡介苗的儿童,8周后用两批不同的结核菌素,一批是标准结核菌素,一批是新制结核菌素,分别注射在儿童的前臂,两种结核菌素的皮肤浸润反应平均直径(mm)如表5-1所示,问两种结核菌素的反应性有无差别。,=TDIST(4.519,11,2)=0.0009,Excel计算方法,Excel计算方法与结果,SPSS计算方法,SPSS计算结果,差值的正态性检验(AnalyzeDescriptive StatisticsExplore),P值0.05,W法与 D法,我国国标GB4882-85推荐方法,Shapiro-Wilk W法(1965年)适用于 Kolmogorov-Smirnov D法(?)适用于,小于3或大于1000怎么办?,H0: 样本对应的总体服从正态分布,表 两种方法对乳酸饮料中的脂肪含量测量结果,H0:d0,应用条件,两变量对子之差来自随机、独立的正态分布总体,Effect size(效应大小),How large is the effect (the difference)? Cohens d Squared correlation coefficient (r2),Effect size: Cohens d,Cohens d: Represents mean difference in standard deviation units,Effect size: Cohens d,Same guidelines for interpreting Cohens d,Percent of variance explained Symbol: r2,Effect size: r2,Effect size: r2,Same guidelines for interpreting r2,4. Two independent-samples t test 两独立样本t 检验,应用于: Experimentaltreatment versus control实验研究 完全随机设计(completely random design) Existing groupsmales versus females观察研究 Goal :Assess whether the means of the populations that two different samples came from are the same or different (or whether one is greater than the other, in a directional test) 目的:比较两总体均数是否有差异。,应用条件,Random and independent samples Normality Homogeneity of variance 两组变量值分别来自随机、独立的正态分布总体,两独立样本t检验计算公式,称为合并方差(combined/pooled variance),例5.3 25例糖尿病患者随机分成两组,甲组单纯用药物治疗,乙组采用药物治疗合并饮食疗法,二个月后测空腹血糖(mmol/L)如表5-2 所示,问两种疗法治疗后患者血糖值是否不同?,代入公式,得:,H0:1=2,H1:12,0.05,Effect size: Cohens d,Cohens d: Represents mean difference in standard deviation units,Effect size: Cohens d,Same guidelines for interpreting Cohens d,Percent of variance explained Symbol: r2,Effect size: r2,Effect size: r2,Same guidelines for interpreting r2,Excel计算方法,Excel计算方法及结果,SPSS计算方法,SPSS计算结果,方差齐性检验,5. test When variances of the two samples are heterogeneous 方差不齐时两样本均数比较 检验,两样本方差齐性检验(homogeneity of variance test),两样本方差齐性检验 2. LEVENE方差齐性检验(LEVENES TEST OF HOMOGENEITY OF VARIANCE) 将原样本观察值作离均差变换,或离均差平方变换然后进行完全随机设计的方差分析,其检验结果用于判断方差是否齐性。 因为后者对原数据是否为正态不灵敏,所以比较稳健,且该方法可用于后面章节方差分析的齐性检验。目前均推荐采用LEVENE方差齐性检验,例5.3 的方差齐性检验,=FINV(0.025,12,11),例5.4 两组小白鼠分别饲以高蛋白和低蛋白饲料,4周后记录小白鼠体重增加量(g)如表5-3所示,问两组动物体重增加量的均数是否相等?,H0:1222,H1:1222,0.05,1n-1= 12-1=11,2 = n-1= 13-1 =12, 查附表3F界值表, F0.05/2,(11,12) 3.34 =3.3215 F F0.05/2,(11,12) P 0.05差别有统计学意义,即方差不齐同,=FINV(0.05/2,11,12),=2*FDIST(5.402,11,12)=0.007,Excel方差齐性检验,Excel方差齐性检验结果,t 检验实例(表5.4数据),H0:12,H1:12,0.05,=TDIST(7.01

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论