第九章卡方检验2
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
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 169 p( A B ) p( A) p( B ) 249 249
192 169 192 169 T ( A B ) np ( A B ) 249 249 249 249 192 80 p ( A B ) p ( A) p ( B ) 249 249
Chi-square test Statistics Statistic Statistician Population rate Sample rate Pooled rate Sample size Sampling error Hypothesis testing 卡方检验 统计学 统计量 统计学家 总体率 样本率 合并率 样本含量 抽样误差 假设检验
Vocabulary of chapter 9
Positive Negative Concordant (agreement) Disconcordant (disagreement) Equivalent to McNemar’s test Proportion 阳性 阴性 一致 不一致 等价于 McNemar 检Fra Baidu bibliotek 构成比
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
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.
Vocabulary of chapter 9
Association Independence Categorical variable Distribution Goodness of fit test General formula Specific formula Continuity correction Completely randomized design Paired design 关联 独立 分类变量 分布 拟合优度检验 基本公式 专用公式 连续性校正 完全随机设计 配对设计
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 bc 2 2
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 )
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.
卫生统计学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)
chi-square test for paired 2×2 table
H0: B=C H1: B≠C 0.05 A1=b A2=c
If H0 is true, T1=T2=(b+c)/2 For large sample (b+c≥40):
bc bc b c b c 2 2 2 2 bc bc bc 2 2
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
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
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
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
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.
练习题: 用两种方法检查已确诊的乳腺癌患者120 名,甲法检出率为60%,乙法检出率为 50%,甲乙两法一致的检出率为35%,问 两种方法检出率有无差别?两种方法有无 关联?
chi-square test for R×C table
R×C table: R numbers of rows C numbers of columns
( 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 2×2 table
两种注射方式接种疫苗不良反应发生率 分组 有不良反应 无不良反应 合计 反应率(%) 肌内 35 74 109 32.11 皮下 22 71 93 23.66 合计 57 145 202 28.22
Question: Are the 2 response rates equal? 1. The type of the experimental design
chi-square test for paired 2×2 table
Purpose 2: testing for the association between 2 methods. H0: method A and method B are independent H1: method A and method B are associated