Chapter 14 Tests of Hypotheses Based on Count Data.ppt
《Chapter 14 Tests of Hypotheses Based on Count Data.ppt》由会员分享,可在线阅读,更多相关《Chapter 14 Tests of Hypotheses Based on Count Data.ppt(46页珍藏版)》请在麦多课文档分享上搜索。
1、Chapter 14 Tests of Hypotheses Based on Count Data,14.2 Tests concerning proportions (large samples) 14.3 Differences between proportions 14.4 The analysis of an r x c table,14.2 Tests concerning proportions (large samples),np5; n(1-p)5 n independent trials; X=# of successes p=probability of a succe
2、ss Estimate:,Tests of Hypotheses,Null H0: p=p0 Possible Alternatives:HA: pp0HA: pp0,Test Statistics,Under H0, p=p0, andStatistic:is approximately standard normal under H0 . Reject H0 if z is too far from 0 in either direction.,Rejection Regions,Equivalent Form:,Example 14.1,H0: p=0.75 vs HA: p0.75 =
3、0.05 n=300 x=206 Reject H0 if z1.96,Observed z value,Conclusion: reject H0 since z2.5)=0.0124a reject H0.,Example 14.2,Toss a coin 100 times and you get 45 heads Estimate p=probability of getting a head Is the coin balanced one? a=0.05 Solution:H0: p=0.50 vs HA: p0.50,Enough Evidence to Reject H0?,C
4、ritical value z0.025=1.96 Reject H0 if z1.96 or z-1.96Conclusion: accept H0,Another example,The following table is for a certain screening test,Test to see if the sensitivity of the screening test is less than 97%.HypothesisTest statistic,Check p-value when z=-2.6325, p-value = 0.004Conclusion: we c
5、an reject the null hypothesis at level 0.05.,What is the conclusion?,One word of caution about sample size:,If we decrease the sample size by a factor of 10,And if we try to use the z-test,P-value is greater than 0.05 for sure (p=0.2026). So we cannot reach the same conclusion.,And this is wrong!,So
6、 for test concerning proportions,We want np5; n(1-p)5,14.3 Differences Between Proportions,Two drugs (two treatments) p1 =percentage of patients recovered after taking drug 1 p2 =percentage of patients recovered after taking drug 2 Compare effectiveness of two drugs,Tests of Hypotheses,Null H0: p1=p
7、2 (p1-p2 =0) Possible Alternatives:HA: p1p2HA: p1p2,Compare Two Proportions,Drug 1: n1 patients, x1 recovered Drug 2: n2 patients, x2 recovered Estimates: Statistic for test:If we did this study over and over and drew a histogram of the resulting values of , that histogram or distribution would have
8、 standard deviation,Estimating the Standard Error,Under H0, p1=p2=p. SoEstimate the common p by,So put them together,Example 12.3,Two sided test: H0: p1=p2 vs HA: p1p2 n1=80, x1=56 n2=80, x2=38,Two Tailed Test,Observed z-value:Critical value for two-tailed test: 1.96 Conclusion: Reject H0 since |z|1
9、.96,Rejection Regions,P-value of the previous example,P-value=P(z2.88)=2*0.004So not only we can reject H0 at 0.05 level, we can also reject at 0.01 level.,14.4 The analysis of an r x c table,Recall Example 12.3 Two sided test; H0: p1=p2 vs HA: p1p2 n1=80, x1=56 n2=80, x2=38 We can put this into a 2
10、x2 table and the question now becomes is there a relationship between treatment and outcome? We will come back to this example after we introduce 2x2 tables and chi-square test.,2x2 Contingency Table,The table shows the data from a study of 91 patients who had a myocardial infarction (Snow 1965). On
11、e variable is treatment (propranolol versus a placebo), and the other is outcome (survival for at least 28 days versus death within 28 days).,Hypotheses for Two-way Tables,The hypotheses for two-way tables are very “broad stroke”. The null hypothesis H0 is simply that there is no association between
12、 the row and column variable.,The alternative hypothesis Ha is that there is an association between the two variables. It doesnt specify a particular direction and cant really be described as one-sided or two-sided.,Hypothesis statement in Our Example,Null hypothesis: the method of treating the myoc
13、ardial infarction patients did not influence the proportion of patients who survived for at least 28 days. The alternative hypothesis is that the outcome (survival or death) depended on the treatment, meaning that the outcomes was the dependent variable and the treatment was the independent variable
14、.,Calculation of Expected Cell Count,To test the null hypothesis, we compare the observed cell counts (or frequencies) to the expected cell counts (also called the expected frequencies)The process of comparing the observed counts with the expected counts is called a goodness-of-fit test. (If the chi
15、-square value is small, the fit is good and the null hypothesis is not rejected.),Observed cell counts,Expected cell counts,The Chi-Square ( c2) Test Statistic,The chi-square statistic is a measure of how much the observed cell counts in a two-way table differ from the expected cell counts. It can b
16、e used for tables larger than 2 x 2, if the average of the expected cell counts is 5 and the smallest expected cell count is 1; and for 2 x 2 tables when all 4 expected cell counts are 5. The formula is: c2 = S(observed count expected count)2/expected count Degrees of freedom (df) = (r 1) x (c 1) Wh
17、ere “observed” is an observed sample count and “expected” is the computed expected cell count for the same cell, r is the number of rows, c is the number of columns, and the sum (S) is over all the r x c cells in the table (these do not include the total cells).,The Chi-Square ( c2) Test Statistic,E
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- CHAPTER14TESTSOFHYPOTHESESBASEDONCOUNTDATAPPT

链接地址:http://www.mydoc123.com/p-379582.html