当前位置:文档之家› 第九章卡方检验2

第九章卡方检验2

Chi-square test Statistics Statistic Statistician Population rate Sample rate Pooled rate Sample size Sampling error Hypothesis testing 卡方检验 统计学 统计量 统计学家 总体率 样本率 合并率 样本含量 抽样误差 假设检验
chi-square test for 2×2 table
If , then reject H0。There is statistically significant difference between 2 sample rates. Or the difference between 2 sample rates is statistically significant. Otherwise, no reason to reject H0。 There is no statistically significant difference between 2 sample rates.
chi-square test for paired 2×2 table
For example 9-3,
(160 48 32 9) 2 249 2 91.95 192 57169 80
1
P 0.005
The outcomes of 2 methods are not independent of one another.Or there is association between the outcomes of 2 methods.
192 80 192 80 T ( A B ) np ( A B ) 249 249 249 249
chi-square test for paired 2×2 table
Chi-square statistic and degree of freedom are both same as those of section 1. However, the design and purpose of study as well as the explanation of results are still different.
chi-square test for paired 2×2 table
关联的方向:
ad-bc > 0: 正相关 ad-bc < 0: 负相关
关联的程度:
Pearson列联系数:
Cp 91.95 0.5193 249 91.95
Cramer列联系数(修正)
Cc 91.95 0.6077 249
4. Analysis of data
H0 :
1 2
H1 :
1 2
0.05
chi-square test for 2×2 table
To apply chi-square test, the sample size should be large enough. Experience: n≥40 and all T≥5 nR nC ( A T )2 2 TRC T n
Vocabulary of chapter 9
Association Independence Categorical variable Distribution Goodness of fit test General formula Specific formula Continuity correction Completely randomized design Paired design 关联 独立 分类变量 分布 拟合优度检验 基本公式 专用公式 连续性校正 完全随机设计 配对设计
chi-square test for paired 2×2 table
4. Analysis of data Purpose 1: testing for the difference between 2 methods. Which is better for high positive rate? Note: The 2 samples are not independent. The above chi-square test does not work.
chi-square test for 2×2 table
2. Collection of data 3. Sorting data: 2×2 table Success Failure Sample 1 a b Sample 2 c d Total a+c b+d
Total a+b c+d n
chi-square test for 2×2 table
练习题: 用两种方法检查已确诊的乳腺癌患者120 名,甲法检出率为60%,乙法检出率为 50%,甲乙两法一致的检出率为35%,问 两种方法检出率有无差别?两种方法有无 关联?
chi-square test for R×C table
R×C table: R numbers of rows C numbers of columns
0.05
Question: if H0 is true, how much is the expected frequency of each cell?
chi-square test for paired 2×2 table
概率乘法定理:互相独立事件同时出现的概率等 于各事件单独出现时概率的乘积。
Vocabulary of chapter 9
Null hypothesis Alternative hypothesis Significance level Table of critical value P value Fourfold table Actual (observed) frequency Theoretical (expected) frequency Row total Column total 无效假设(零假设) 备择假设 检验水准 界值表 P值 四格表 实际(观察)频数 理论(期望)频数 行合计 列合计
2 2 0.05,
chi-square test for 2×2 table
n≥40 but any 1≤T<5 Yates correction (continuity correction)

2
( A T 0.5) 2 T
n 2 ( ad bc ) n 2 2 (a b)( c d )( a c)( b d )
( R 1)(C 1)
(ad bc) n (a b)(c d )(a c)(b d )
2 2
chi-square test for 2×2 table
If H0 is true, A and T should be close each other and chi-square statistic will tend to be small. If H0 is not true, chi-square statistic will tend to be large.
chi-square test for paired 2×2 table
1. Design Paired design. Each food sample has to be detected by method A and method B. 2. Collection of data
chi-square test for paired 2×2 table
2 2
For example 9-3, b+c=32+9=41>40,
b c
2
2
1
bc
32 9
32 9
2
12.90
P 0.005
chi-square test for paired 2×2 table
Conclusion: reject H0. There is statistically significant difference in positive rates of 2 methods. Since pA (77.11%) > pB (67.87%), method A is better. This test is called McNemar’s test.
卫生统计学Health Statistics
第九章
检验(II)
2
chi-square test(II)
余红梅
Department of Health Statistics
School of Public Health, Shanxi Medical University
Vocabulary of chapter 9
3. Sorting data: paired 2×2 table
Outcomes of method A and method B Method A Method B Total + - + 160 (a) 32 (b) 192 (a+b) - 9 (c) 48 (d) 57 (c+d) Total 169 (a+c) 80 (b+d) 249 (n)
2 2
chi-square test for paired 2×2 table
If b+c<40, chi-square needs correction.
bc bc 0.5 0.5 b c 2 2 2 b c 1 2 bc bc bfor paired 2×2 table
相关主题