Presentation is loading. Please wait.

Presentation is loading. Please wait.

余红梅 Department of Health Statistics School of Public Health, Shanxi Medical University 卫生统计学 Health Statistics 第九章 检验( II ) chi-square test ( II )

Similar presentations


Presentation on theme: "余红梅 Department of Health Statistics School of Public Health, Shanxi Medical University 卫生统计学 Health Statistics 第九章 检验( II ) chi-square test ( II )"— Presentation transcript:

1 余红梅 Department of Health Statistics School of Public Health, Shanxi Medical University 卫生统计学 Health Statistics 第九章 检验( II ) chi-square test ( II )

2 Vocabulary of chapter 9 Chi-square test 卡方检验 Statistics 统计学 Statistic 统计量 Statistician 统计学家 Population rate 总体率 Sample rate 样本率 Pooled rate 合并率 Sample size 样本含量 Sampling error 抽样误差 Hypothesis testing 假设检验

3 Vocabulary of chapter 9 Null hypothesis 无效假设(零假设) Alternative hypothesis 备择假设 Significance level 检验水准 Table of critical value 界值表 P value P 值 Fourfold table 四格表 Actual (observed) frequency 实际 ( 观察 ) 频数 Theoretical (expected) frequency 理论 ( 期望 ) 频数 Row total 行合计 Column total 列合计

4 Vocabulary of chapter 9 Association 关联 Independence 独立 Categorical variable 分类变量 Distribution 分布 Goodness of fit test 拟合优度检验 General formula 基本公式 Specific formula 专用公式 Continuity correction 连续性校正 Completely randomized design 完全随机设计 Paired design 配对设计

5 Vocabulary of chapter 9 Positive 阳性 Negative 阴性 Concordant (agreement) 一致 Disconcordant (disagreement) 不一致 Equivalent to 等价于 McNemar’s test McNemar 检验 Proportion 构成比

6 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

7 chi-square test for 2×2 table 2. Collection of data 3. Sorting data: 2×2 table Success Failure Total Sample 1 a b a+b Sample 2 c d c+d Total a+c b+d n

8 chi-square test for 2×2 table 4. Analysis of data

9 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

10 chi-square test for 2×2 table  If H 0 is true, A and T should be close each other and chi-square statistic will tend to be small.  If H 0 is not true, chi-square statistic will tend to be large.

11 chi-square test for 2×2 table  If, then reject H 0 。 There is statistically significant difference between 2 sample rates. Or the difference between 2 sample rates is statistically significant.  Otherwise, no reason to reject H 0 。 There is no statistically significant difference between 2 sample rates.

12 chi-square test for 2×2 table  n≥40 but any 1≤T < 5 Yates correction (continuity correction)

13 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

14 chi-square test for paired 2×2 table 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)

15 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.

16 chi-square test for paired 2×2 table H 0 : B=C H 1 : B≠C A 1 =b A 2 =c If H 0 is true, T 1 =T 2 =(b+c)/2 For large sample (b+c≥40):

17 chi-square test for paired 2×2 table If b+c < 40, chi-square needs correction. For example 9-3, b+c=32+9=41>40,

18 chi-square test for paired 2×2 table Conclusion: reject H 0. There is statistically significant difference in positive rates of 2 methods. Since p A (77.11%) > p B (67.87%), method A is better. This test is called McNemar’s test.

19 chi-square test for paired 2×2 table Purpose 2: testing for the association between 2 methods. H 0 : method A and method B are independent H 1 : method A and method B are associated Question: if H 0 is true, how much is the expected frequency of each cell?

20 chi-square test for paired 2×2 table  概率乘法定理:互相独立事件同时出现的概率等 于各事件单独出现时概率的乘积。

21 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.

22 chi-square test for paired 2×2 table For example 9-3,  The outcomes of 2 methods are not independent of one another.Or there is association between the outcomes of 2 methods.

23 chi-square test for paired 2×2 table  关联的方向: ad-bc > 0: 正相关 ad-bc < 0: 负相关  关联的程度: Pearson 列联系数: Cramer 列联系数(修正)

24 练习题: 用两种方法检查已确诊的乳腺癌患者 120 名,甲法检出率为 60 %,乙法检出率为 50% ,甲乙两法一致的检出率为 35 %,问 两种方法检出率有无差别?两种方法有无 关联?

25 chi-square test for R×C table R×C table: R numbers of rows C numbers of columns

26 chi-square test for R×C table  Comparison of more than 2 sample rates  Comparison of 2 or more than 2 sample proportions  Association analysis of 2 categorical variables Note: There is no order among categories of each variable.

27 Cautions:  When more than 2 groups are compared, H 0 is rejected only means there is difference among some groups. It dose not necessarily mean that all the groups are different.  chi-square test requires large sample. By experience, the T should be at least 5 in more than 4/5 cells, and T in any cell should be greater than 1. Otherwise, we cannot use chi- square test directly.  For ordinal data comparison, see chapter 10.

28 Summary  Chi-square test for 2 independent sample rates n≥40 and all T≥5, no need of correction. n≥40 but any 1≤T < 5, correction is needed.  Chi-square test for paired 2×2 table Testing for the difference between 2 methods Testing for association between 2 methods  Chi-square test for R×C table Testing for the difference among more rates, proportions, or testing for the association between 2 categorical variables (no order).

29


Download ppt "余红梅 Department of Health Statistics School of Public Health, Shanxi Medical University 卫生统计学 Health Statistics 第九章 检验( II ) chi-square test ( II )"

Similar presentations


Ads by Google