最新统计学第八章方差分析
• 所有总体的均值都相等 • 各组均值之间没有差异
H1: 1 , 2 , 3 , …, s 不全相等
• 至少有两个不相等 (其它可能相同!)
• 不意味着有: 1 2 ... s
One-Factor ANOVA:
H0: 1 = 2 = 3 = ... = c
请注意其含义
H1: not all the k are equal
之间的平均效果 (均值) 差异足够大, 方案之内的差异相对
小. 反之, 就接受 H0 , 即不同方案的效果没有显著性差异.
注: 用 SPSS 做方差分析中, 输出的结果是: 统计值 f 右侧 的概率, 其与给定显著性水平 进行比较.
如: 查F表得: f , 当 f f ,
在SPPS 的结果中是输出 f 值右侧概率 p .
The Null Hypothesis is True
One Factor ANOVA:
H0: 1 = 2 = 3 = ... = c H1: not all the k are equal
The Null Hypothesis is
NOT True
Total Variation 总变异
s
n i
SST
( X ij X )2
i1 j1
Xij = the ith observation in group i ni = the number of observations in group i
n = the total number of observations in all groups
s
n i
SStotal [
( xij X total )2 ]
i1 j 1
s i 1
ni
(
X
i
X total
)2
s i 1
( x n i
j 1 ij
Xi )2
SS Among SSWithin
MSA SS Among /(s 1), MSW SSWithin /(n s)
F MSA / MSB ~ F (s 1, n s)
MSW =
SSW/(n - S)
Total
n - 1 SST = SSA+SSW
根据观测值, 计算出f 值, 若 f > f (s-1, n-s) (显著性水平为), 则表明 SSb 较大, Xi – Xtotal 的平方和较大, 对应的总体参数
是 i - 的绝对值较大,所以拒绝 H0 , 即至少有两个方案
One-Factor Analysis of Variance 单因子方差分析
单因素方差分析是对多套实验方案的效果的对比 分析,可以用来检验多组相关样本之间均值有无显著 性差异。
如:s 组人员的工资水平、s 种同功能药品的效果、s 种 训练方法的训练效果、 等问题,有无显著性差异。
假设条件: 样本是随机并独立地抽取 (这个条件一定要满足) 所有总体都服从正态分布 所有总体的方差都相等
Among-Group Variation 组间变异
s
SSA ni ( X i X )2 i 1
MSA SSA s 1
ni = the number of observations in group i
s = the number of groups
_
Xi the sample mean of group i
•
••
(ns
1)S
2 s
(n1 1) (n2 1) • • • (ns 1)
• If more than 2 groups, use F Test.
• For 2 groups, use t-Test. F Test more limited.
i
One-Way ANOVA Summary Table 单因子方差分析表
p
f f
One-Factor ANOVA F Test Example
As production manager, you Machine1 Machine2
Source of Degrees
Variation
of
Freedom
Among (Factor)
s-1
Sum of Squares
SSA
Mean
F Test
Square Statistic
(Variance) MSA =
= MSA MSW
SSA/(s - 1)
Within (Error)
n -s
SSW
__
X the overall or grand mean
i j Variation Due to Differences Among Groups.
Within-Group Variation 组内变异
s
n i
SSW
( X ij X i )2
i1 j1
MSW SSW ns
X ij the jth observation in group i
X i the sample mean of group i
Summing the variation within each group and then adding over all groups.
i
Within-Group Variation
MSW SSW ns
(n1
1)S12
(n2
1)S22
s = the number of groups
s
n j
X ij
X j 1 i1 n
2、总变异的分解……方差分析的关键!!!
s
n i
X total [
xij ] / n, n n1 n2 ... ns ij
]/
ni ,
j
1,2,...,s;
第八章 方差分析(ANOVA) Analysis of Variance
在参数假设检验中,我们经常检验两个总 体分布的均值是否相同,其中运用的统计量主 要是 t 统计量。
如果有多个总体,则必须进行两两比较检 验,显然很繁琐。而方差分析,可以一次完成 对多个总体的均值是否相同的检验:
H0: 1 = 2 = 3 = ... = s
多个独立样本均值的比较--单因素方差分析
1、资料类型
方案 1 x11
x12
方案 2 x21
x22
方案 3 x31
x32
…
…
…
方案 s xs1
xs2
…… …… …… …… ……
x1n 1
x2n 2
x3n 3
…
xsn s
注意,s 个样本中含量不必相等!!!
单因素方差分析的假设检验
H0: 1 = 2 = 3 = ... = s =