1、1,第七讲,两个样本的假设检验 Tests of Hypothesis Involving Two Samples,2,第一节,方差的比较 Comparing Two Variance F 检验,3,提问,The ratio of the sample variance, if the two populations are normal and have equal variance, will come from a sampling distribution known as F distribution. 如果两个样本服从正态分布而且方差相等,则两个样本方差之比的分布称为F分布,F分布
2、的定义?,4,The F Statistic,We can use the F statistic to test the assumption that the variances are equal where F=(larger of )/(smaller of ) 我们可以利用F统计量检验方差是否相等 A test of F is a two-tailed F test. F测验是一种双尾测验,5,Comparing Two Variance,例1:两个地方成年颚鱼的重量如下表所示。问变异差异是否显著?,6,Solution:,df: (13-1, 7-1), c.v.=ca. 5.3
3、7(双尾5%),7,何时进行F检验,样本服从正态分布 否则要经过数据转换,8,第二节,Testing the Difference between Two Means of Independent Samples 两个独立样本平均数的检验,9,t 分布,The continuous probability distribution of a random variable formed from the ratio of a random variable with a standard normal distribution and the square root of a random v
4、ariable with a chi-squared distribution divided by its degrees of freedom. t 分布 分子: 正态分布. 分母: 卡方分布的平方根,10,两个独立样本,非配对试验设计 试验单位完全随机地分成两组 两组试验单位相互独立 样本含量不一定相等,11,一、方差相等,Under H0, (1-2)=0 making the test statistic for the difference in means of independent samples with equal variances,12,例题,问:上例中两地成年鄂鱼的
5、体重差异是否显著? H0: A B Ha: A B,13,Solution:,14,SUMMARY,F检验,检查两样本的方差是否相等。 如果相等,计算 t 统计量。 三种假设检验。,15,二、方差不相等,If we can assume that the two samples are independent and from normal populations, but cannot assume that they come from populations with equal variances, the t test must be modified into a more con
6、servative form. 如果我们只能假定两个样本来自独立的正态分布,但不能假定两个样本的方差相等,那么 t 测验必须经过修正,使之比较保守.,16,Unequal Population Variances,Formula: The t test for H0: 1=2 when the population variance differ is,Welchs approximate or Smith-Satterthwaite procedure(1946),近似 t 统计量,17,Cochran & Cox Approximation,Where t1 & t2 are the cr
7、itical values of the t distribution corresponding to a significance level of p and sample sizes of n1 and n2, respectively. The number of degree of freedom is between n1-1 and n2-1. In general, the Cochran and Cox test tends to be conservation.,18,例题,科学家利用小鼠测试某种药物是否真的可以降低水的消耗量。结果如下表。,19,Solution,F0.
8、975(9,14)=3.87 F0.025(14,9)=1/ F0.975(9,14)=1/3.21=0.31 7.113.87,H0: Ha:,20,解,拒绝H0,21,三、1-2 的置信区间,在两个样本等方差的假设下, 1-2 的置信区间为,22,三、1-2 的置信区间,在两个样本方差不等的假设下, 1-2 的置信区间为,23,第三节 配对数据,Paired Data,24,配对试验,配对试验 将试验单位两两配对 将配成对子的两个试验单位随同地分配到两个处理组 目的 减少试验误差 提高试验的准确性和精确必性。 要求 配对的试验单位的初始条件一致 不配对的试验单位的初始条件允许有差异,25,配对试验,配对方式 自身配对 同一试验单位不同时间接受前后两次处理 同一试验单位的不同部位、不同试验方法 举例:病畜治疗前后临床检查结果 同源配对 来源、性质相同 举例:同一窝猪,26,配对试验,配对设计试验资料的一般形式,27,配对试验,公式:配对样本 t 测验的测验统计量为df=n-1,n为配对数。,28,10只家兔注射某种药物前后体温变化,29,解,临界值:双尾,1%显著水平=3.250,