《第五章假设检验与统计推断1.ppt》由会员分享,可在线阅读,更多相关《第五章假设检验与统计推断1.ppt(54页珍藏版)》请在三一办公上搜索。
1、5-1,Chapter 5:Hypothesis Testing and Statistical Inference,一、假设检验的概念与思想,什么是假设(hypothesis)?,对总体参数的的数值所作的一种陈述总体参数包括总体均值、比例、方差等分析之前必需陈述其动机主要是企图利用人们掌握的反映现实的数据来找出假设与现实之间的矛盾,从而否定这个假设,我认为该地区新生婴儿的平均体重为3190克!,什么是假设检验(hypothesis testing)?,事先对总体参数或分布形式作出某种假设,然后利用样本信息来判断原假设是否成立有参数假设检验和非参数假设检验采用逻辑上的反证法,依据统计上的小概率
2、原理,假设检验的基本思想,.因此我们拒绝假设=50,样本均值,m,=50,抽样分布,H0,假设检验的过程,5-7,Hypothesis Testing,Hypothesis testing involves drawing inferences about two contrasting propositions(hypotheses)relating to the value of a population parameter,one of which is assumed to be true in the absence of contradictory data.We seek evi
3、dence to determine if the hypothesis can be rejected;if not,we can only assume it to be true but have not statistically proven it true.,5-8,Hypothesis Testing Procedure,Formulate the hypothesisSelect a level of significance,which defines the risk of drawing an incorrect conclusion that a true hypoth
4、esis is false Determine a decision ruleCollect data and calculate a test statisticApply the decision rule and draw a conclusion,5-9,1.Hypothesis Formulation,Null hypothesis,H0 a statement that is accepted as correctAlternative hypothesis,H1 a proposition that must be true if H0 is falseTests involvi
5、ng a single population parameter are called one-sample tests;tests involving two populations are called two-sample tests.,5-10,Types of Hypothesis Tests,One Sample TestsH0:population parameter constant vs.H1:population parameter constantH0:population parameter=constant vs.H1:population parameter con
6、stantTwo Sample TestsH0:population parameter(1)-population parameter(2)0 vs.H1:population parameter(1)-population parameter(2)0H0:population parameter(1)-population parameter(2)=0 vs.H1:population parameter(1)-population parameter(2)0,5-11,Formulating Hypotheses,Formulating the correct set of hypoth
7、eses depends on“burden of proof”what you wish to prove statistically should be H1Example:To seek evidence that technical support calls average less than 30 minutes(Customer Support Survey file),the correct hypotheses are:H0:Mean response time 30 minutesH1:Mean response time 30 minutes,5-12,2.显著性水平Fo
8、ur Outcomes,The null hypothesis is actually true,and the test correctly fails to reject it.The null hypothesis is actually false,and the hypothesis test correctly reaches this conclusion.The null hypothesis is actually true,but the hypothesis test incorrectly rejects it(Type I error).The null hypoth
9、esis is actually false,but the hypothesis test incorrectly fails to reject it(Type II error).,5-13,Quantifying Outcomes,Probability of Type I error(rejecting H0 when it is true)=a=level of significanceProbability of correctly failing to reject H0=1 a=confidence coefficient Probability of Type II err
10、or(failing to reject H0 when it is false)=bProbability of correctly rejecting H0 when it is false=1 b=power of the test,假设检验中的两类错误,1.第一类错误(弃真错误)原假设为真时拒绝原假设会产生一系列后果第一类错误的概率为被称为显著性水平2.第二类错误(取伪错误)原假设为假时接受原假设第二类错误的概率为(Beta),H0:无罪,假设检验中的两类错误(决策结果),假设检验就好像一场审判过程,统计检验过程,错误和 错误的关系,5-17,3.Decision Rules,Comp
11、ute a test statistic from sample data and compare it to the hypothesized sampling distribution of the test statisticDivide the sampling distribution into a rejection region and non-rejection region.If the test statistic falls in the rejection region,reject H0(concluding that H1 is true);otherwise,fa
12、il to reject H0,5-18,Rejection Regions,5-19,4.Hypothesis Tests and Spreadsheet Support,5-20,Hypothesis Tests and Spreadsheet Support(contd),5-21,二、单样本假设检验1.One Sample Tests for Means Standard Deviation Unknown,Example hypothesisH0:m m0 versus H1:m m0 Test statistic:Reject H0 if t-tn-1,5-22,Example,F
13、or the Customer Support Survey.xls data,test the hypotheses H0:mean response time 30 minutesH1:mean response time 30 minutes Sample mean=21.91;sample standard deviation=19.49;n=44 observations Reject H0 because t=2.75-t43,0.05=-1.6811,5-23,PHStat Tool:t-Test for Mean,PHStat menu One Sample Tests t-T
14、est for the Mean,Sigma Unknown,Enter null hypothesis and alphaEnter sample statistics or data rangeChoose type of test,5-24,Results,5-25,2.Using p-Values,p-value=probability of obtaining a test statistic value equal to or more extreme than that obtained from the sample data when H0 is true,shown as
15、areas under the sampling distributions below,Test Statistic,Lower one-tailed test?Two-tailed test,m0,m0,Test Statistic,5-26,Example p-Value,p=probability of obtaining a test statistic of-2.75 or less=0.0043,5-27,Two-Tailed Test,Consumer Transportation Survey H0:Mean age=40H1:Mean age 40Sample mean=3
16、7.9;sample standard deviation=11,5-28,Results,5-29,3.One Sample Tests for Proportions,Example hypothesisH0:p p0 versus H1:p p0Test statistic:Reject if z-za,5-30,Example,For the Customer Support Survey data,test the hypothesis that the proportion of overall quality responses in the top two boxes(3很好,
17、4 非常好)is at least 0.75H0:p.75H0:p.75Sample proportion=0.682;n=44For a level of significance of 0.05,the critical value of z is-1.645;therefore,we cannot reject the null hypothesis,5-31,PHStat Tool:One Sample z-Test for Proportions,PHStat One Sample Tests z-Tests for the Proportion,Enter null hypothe
18、sis,significance level,number of successes,and sample sizeEnter type of test,5-32,Results,5-33,4.Type II Errors and the Power of a Test,The probability of a Type II error,b,and the power of the test(1 b)cannot be chosen by the experimenter.The power of the test depends on the true value of the popul
19、ation mean,the level of confidence used,and the sample size.A power curve shows(1 b)as a function of m1.,5-34,Finding the Probability of a Type II Error,5-35,How b Depends on H1,5-36,How b Depends on Sample Size,5-37,Example Power Curve,5-38,三、两样本假设检验1.Two Sample Tests for Means Standard Deviation K
20、nown,Example hypothesisH0:m1 m2 0 versus H1:m1-m2 0Test Statistic:Reject if z-za,5-39,Two Sample Tests for Means Sigma Unknown and Equal,Example hypothesis H0:m1 m2 0 versus H1:m1-m2 0Test Statistic:Reject if z za,5-40,Two Sample Tests for Means Sigma Unknown and Unequal,Example hypothesis H0:m1 m2=
21、0 versus H1:m1-m2 0Test Statistic:Reject if z za/2 or z-za/2,t=(x1-x2)/,with df=,5-41,Spreadsheet Tools:Two Sample t-Tests,Population Variance Known,Excel z-test:Two Sample for MeansPHStat Z Test for Differences in Two Means,5-42,Spreadsheet Tools:Two Sample t-Tests,Population Variance Unknown,Popul
22、ation variances assumed unequalExcel t-test:Two Sample Assuming Unequal VariancesPopulation variances assumed unequalExcel t-test:Two Sample Assuming Equal VariancesPHStat t-test for Differences in Two Means,5-43,Interpreting Excel Output,If t Stat is negative,provides the correct p-value for a lowe
23、r-tail test;however,for an upper-tail test,you must subtract this number from 1.0 to get the correct p-value.If t Stat is nonnegative then provides the correct p-value for an upper tail test;consequently,for a lower tail test,you must subtract this number from 1.0 to get the correct p-value.Also,for
24、 a lower tail test,you must change the sign on t Critical one-tail.,5-44,Comparison of Excel and PHStat Results Lower-Tail Test,5-45,2.Two Sample Test for Means With Paired Samples,Example hypothesis H0:average difference=0 versus H1:average difference 0Test Statistic:Reject if t tn-1,a/2 or t-tn-1,
25、a/2,5-46,Excel Tool Example:Pile Foundation Data,H0:Average difference=0H1:Average difference 0Sample mean difference=6.3Sample standard deviation=10.31,5-47,3.Two Sample Tests for Proportions,Example hypothesis H0:p1 p2=0 versus H1:p1-p2 0Test Statistic:Reject if z za/2 or z-za/2,where,5-48,Example
26、:Accounting Professionals Data,H0:Proportion of females with graduate degree proportion of males with graduate degree=0H1:Proportion of females with graduate degree proportion of males with graduate degree 0PHStat tool:z-Test for Differences in Two Proportions,5-49,Results,5-50,4.Hypothesis Tests an
27、d Confidence Intervals,If a 100(1 a)%confidence interval for a two-tailed test does not contain the hypothesized value,then we would reject the null hypothesis.If a 100(1 a)%confidence interval for a lower(upper)one-tailed test lies entirely below(above)the hypothesized value,then we would reject th
28、e null hypothesis.,5-51,5.F-Test for Differences in Two Variances,Hypothesis H0:s12 s2 2=0 versus H1:s12-s22 0Test Statistic:Assume s12 s22 Reject if F Fa/2,n1-1,n2-1(see Appendix A.4)Assumes both samples drawn from normal distributions,5-52,Excel Data Analysis Tool:F-Test for Equality of Variances,
29、Tools Data Analysis F-test for Equality of VariancesSpecify data rangesUse a/2 for the significance level!If the variance of Variable 1 is greater than the variance of variable 2,the output will specify the upper tail;otherwise,you obtain the lower tail information.,5-53,PHStat Tool:F-Test for Differences in Variances,PHStat menu Two Sample Tests F-test for Differences in Two Variances Compute and enter sample standard deviationsEnter the significance level a,not a/2 as in Excel,5-54,Excel and PHStat Results,
链接地址:https://www.31ppt.com/p-5682267.html