欢迎来到麦多课文档分享! | 帮助中心 海量文档,免费浏览,给你所需,享你所想!
麦多课文档分享
全部分类
  • 标准规范>
  • 教学课件>
  • 考试资料>
  • 办公文档>
  • 学术论文>
  • 行业资料>
  • 易语言源码>
  • ImageVerifierCode 换一换
    首页 麦多课文档分享 > 资源分类 > PPT文档下载
    分享到微信 分享到微博 分享到QQ空间

    Chapter 14 Tests of Hypotheses Based on Count Data.ppt

    • 资源ID:379582       资源大小:1.43MB        全文页数:46页
    • 资源格式: PPT        下载积分:2000积分
    快捷下载 游客一键下载
    账号登录下载
    微信登录下载
    二维码
    微信扫一扫登录
    下载资源需要2000积分(如需开发票,请勿充值!)
    邮箱/手机:
    温馨提示:
    如需开发票,请勿充值!快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如需开发票,请勿充值!如填写123,账号就是123,密码也是123。
    支付方式: 支付宝扫码支付    微信扫码支付   
    验证码:   换一换

    加入VIP,交流精品资源
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    Chapter 14 Tests of Hypotheses Based on Count Data.ppt

    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

    18、xample: Patient Compliance w/ Rx,Treatment Compliance 10 mg Daily 5 mg bid Total 95%+ 46 40 86 95% 4 10 14 Total 50 50 100,In a study of 100 patients with hypertension, 50 were randomly allocated to a group prescribed 10 mg lisinopril to be taken once daily, while the other 50 patients were prescrib

    19、ed 5 mg lisinopril to be taken twice daily. At the end of the 60 day study period the patients returned their remaining medication to the research pharmacy. The pharmacy then counted the remaining pills and classified each patient as 95% or 95%+ compliant with their prescription. The two-way table f

    20、or Compliance and Treatment was:,Example: Patient Compliance w/ Rx,Treatment Compliance 10 mg Daily 5 mg bid Total 95%+ 460 400 860 95% 40 100 140 Total 500 500 1000,c2 = 29.9, df = (2-1)*(2-1) = 1, P-value 0.001,If we use the two sample test for proportion,The c2 and z Test Statistics,The compariso

    21、n of the proportions of “successes” in two populations leads to a 2 x 2 table, so the population proportions can be compared either using the c2 test or the two-sample z test . It really doesnt matter, because they always give exactly the same result, because the c2 is equal to the square of the z s

    22、tatistic and the chi-square with one degree of freedom c2(1) critical values are equal to the squares of the corresponding z critical values.,A P-value for the 2 x 2 c2 can be found by calculating the square root of the chi-square, looking that up in Table for P(Z z) and multiplying by 2, because th

    23、e chi-square always tests the two-sided alternative.,For a 2 x 2 table with a one-sided alternative hypothesis the two-sample z statistic would need to be used.,To test more than two populations the chi-square must be used,The chi-square is the one most often seen in the literature,Summary: Computat

    24、ions for Two-way Tables,create the table, including observed cell counts, column and row totals.,Find the expected cell counts. Determine if a c2 test is appropriate Calculate the c2 statistic and number of degrees of freedom,Find the approximate P-value use Table III chi-square table to find the ap

    25、proximate P-value or use z-table and find the two-tailed p-value if it is 2 x 2.,Draw conclusions about the association between the row and column variables.,Yates Correction for Continuity,The chi-square test is based on the normal approximation of the binomial distribution (discrete), many statist

    26、icians believe a correction for continuity is needed.It makes little difference if the numbers in the table are large, but in tables with small numbers it is worth doing.It reduces the size of the chi-square value and so reduces the chance of finding a statistically significant difference, so that c

    27、orrection for continuity makes the test more conservative.,What do we do if the expected values in any of the cells in a 2x2 table is below 5?,For example, a sample of teenagers might be divided into male and female on the one hand, and those that are and are not currently dieting on the other. We h

    28、ypothesize, perhaps, that the proportion of dieting individuals is higher among the women than among the men, and we want to test whether any difference of proportions that we observe is significant. The data might look like this:,The question we ask about these data is: knowing that 10 of these 24

    29、teenagers are dieters, what is the probability that these 10 dieters would be so unevenly distributed between the girls and the boys? If we were to choose 10 of the teenagers at random, what is the probability that 9 of them would be among the 12 girls, and only 1 from among the 12 boys?-Hypergeomet

    30、ric distribution!-Fishers exact test uses hypergeometric distribution to calculate the “exact” probability of obtaining such set of the values.,Fishers exact test,Before we proceed with the Fisher test, we first introduce some notation. We represent the cells by the letters a, b, c and d, call the t

    31、otals across rows and columns marginal totals, and represent the grand total by n. So the table now looks like this:,Fisher showed that the probability of obtaining any such set of values was given by the hypergeometric distribution:,In our example,Recall that p-value is the probability of observing

    32、 data as extreme or more extreme if the null hypothesis is true. So the p-value is this problem is 0.00137.,As extreme as observed,More extreme than observed,The fisher Exact Probability Test,Used when one or more of the expected counts in a contingency table is small (2). Fishers Exact Test is base

    33、d on exact probabilities from a specific distribution (the hypergeometric distribution). Theres really no lower bound on the amount of data that is needed for Fishers Exact Test. You can use Fishers Exact Test when one of the cells in your table has a zero in it. Fishers Exact Test is also very usef

    34、ul for highly imbalanced tables. If one or two of the cells in a two by two table have numbers in the thousands and one or two of the other cells has numbers less than 5, you can still use Fishers Exact Test. Fishers Exact Test has no formal test statistic and no critical value, and it only gives you a p-value.,


    注意事项

    本文(Chapter 14 Tests of Hypotheses Based on Count Data.ppt)为本站会员(ideacase155)主动上传,麦多课文档分享仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知麦多课文档分享(点击联系客服),我们立即给予删除!




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

    copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
    备案/许可证编号:苏ICP备17064731号-1 

    收起
    展开