Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Psychometrics wikipedia , lookup
History of statistics wikipedia , lookup
Taylor's law wikipedia , lookup
Foundations of statistics wikipedia , lookup
Bootstrapping (statistics) wikipedia , lookup
Statistical hypothesis testing wikipedia , lookup
Resampling (statistics) wikipedia , lookup
David S. Moore • George P. McCabe Introduction to the Practice of Statistics Fifth Edition Chapter 6: Introduction to Inference Copyright © 2005 by W. H. Freeman and Company Introduction to Inference • • • • 6.1 – Estimating with Confidence 6.2 – Tests of Significance 6.3 – Use and Abuse of Tests 6.4 – Power and Inference as a Decision (optional) We will explore these ideas in the context of estimating and/or testing hypotheses about a population mean, . Section 6.1 Estimating with Confidence Example 6.2 (page 384): • Goal: Estimate the mean SATM score, , for all California seniors. • Take SRS of 500 California seniors. • Find the sample mean, x 461 . • How well does x estimate ? Question: What is the sampling distribution of x (suppose we know 100)??? Why?? 100 N ( X , X ) N ( X , X ) N ( X , X 4.5) n 500 Values of x are distributed according to this density curve. How likely is it that your value of x will be within 2 X 9 of the (unknown) value of ? ?? N ( X , X 4.5) Sampling Distribution of x 95% of the time, 2 X 9 of x 5% of the time 2 X 9 of x will be within ! x x will not be within x x If is within of is within 2 X 9 of , then ! x Thus, we are 95% confident that x x 9 x 9 x x2 x9 x9 x 9 x n x2 Or in our case ( x9 n x 461 ) 461 9 461 9 452 470 There is a 5% chance that this interval does not capture the population mean! that Confidence Intervals • We have just computed a 95% confidence interval for • The endpoints of the interval (452, 470) depended on three values: – The point estimate for , x – The level of confidence which determined how many standard deviations to use (95%: we used approximately two standard deviations) 100 – The standard deviation of the point estimate, X 4.5 n 500 which also depends on the sample size, n. • The interval also depended on the fact that we knew that the sampling distribution of the statistic, x is normal (or approximately normal, since n is large)! We are 95% confident that the true population mean is contained in the confidence interval. WHY? Because according to the Central Limit Theorem, there is a 95% chance that the estimate of the population mean (i.e. the sample mean), will be within 2 standard deviations (of the sampling distribution!) of the true population mean. Page 386 Let’s try playing with the “Confidence Interval” applet on your CD…. For finding a level C confidence interval for a population mean, how does the confidence level determine the number of standard deviations to use to compute the interval? For a 95% confidence interval for we used approximately 2 standard deviations to compute the endpoints of our interval: How do we find z* ? x 2 x x 2 x x2 x z* n n x2 x z* n n What happens to z* when the C-level changes? * Let’s find z for various C-levels for a C-level confidence interval for a population mean, . (see page 387) Standard Normal Density Curve CLevel 99% Value of 95% 1.960 ?? 90% 1.645 ?? 85% 1.440 ?? Use the invNorm key on your TI-83! z * 2.576 ?? Let’s use our TI-83 calculators to find some C-level confidence intervals and explore their behavior! Example 6.3 (page 388): Find a 95% confidence interval for . (What is ??) You are given what values? What is the margin of error for this confidence interval? What is the confidence interval? Write a sentence that explains the meaning of this interval. Let’s also use the Stat|Tests|ZInterval key on your TI-83! What if we change the C-level to 99%? How will the interval change (see picture page 391)? What if we change the C-level to 90% What if the sample size in Example 6.3 (page 388) was actually 320 instead of 1280? How will this effect the margin of error, the confidence interval? New margin of error? New confidence interval? See Figure 6-5 on page 390 (and below): • Goals for Estimating Population Parameters: – High Confidence – Low Margin of Error • How to Reduce the Margin of Error mz * – Change C-Level? n Lower C-Level Results in Smaller Value of z*. – Change Sample Size? Larger n will reduce m since you will divide by a larger value. – Change Population Standard Deviation? Smaller will reduce m. This may not be possible to do. Page 390 Suppose we want a certain margin of error for our confidence interval for a population mean. What sample size will be needed to get the desired result? (Assume we know the population standard deviation.) mz * Let’s solve this equation for n!! n Let’s work Problem 6.28 on page 399! Section 6.2 Tests of Significance Example 6.14 (page 410): • Goal: Test a claim about a population parameter (in this case, the mean systolic b.p., , for all middle aged male executives). • Is the mean significantly different than the mean for the general of is males to 44 (which equals What is population the claim, what beingaged tested35 about the parameter? 128)? • Take SRS of size 72 from the middle aged male executives (i.e. from the the population Collect evidence. for ). • Find the sample mean, x 126.07 . What is this value? • Does the data from the sample support the claim or not? I.e. based on the data ( x ), do you believe the mean systolic b.p.appropriate for middle aged male executives ( ) is Draw the conclusions based on the evidence. significantly different than mean for the general population of males (i.e. 128 mmHG)? Formulating Hypotheses For us, the null hypothesis will contain an equality involving the parameter! The alternative hypothesis is what we hope or suspect is true about the parameter (instead of the equality in the null hypothesis). This will depend on the problem statement. For our example: H 0 : 128 H a : 128 Says the mean systolic b.p. of middle-aged male executives is not different (i.e. not statistically significantly different) than 128 Says the mean systolic b.p. of middle-aged male executives is different (i.e. statistically significantly) than 128 The Logic of Hypothesis Testing • Assume the null hypothesis is TRUE! • Determine how likely it is to get data as extreme as what you got IF this is the case (i.e. IF the null hypothesis is TRUE). • If it is very unlikely to get data as extreme as what you got, then you doubt the assumption that the null hypothesis is true (i.e. you will reject the null hypothesis). • If it is not very unlikely to get data as extreme as what you got, then you have no reason to doubt the null hypothesis (i.e. you will fail to reject the null hypothesis). • The direction “as extreme” is determine by the alternative hypothesis. Following the Logic for Our Example (6.14 page 410) H 0 : 128 H a : 128 IF the null hypothesis is TRUE (and assume the population of middle-aged executives has the same standard deviation as the males aged 35 to 44, i.e. assume 15 ), then what is the (approximate?) sampling distribution for x ? Why? 15 N ( X , X ) N ( X 128, X ) n 72 How “far out” is our data? I.e. how many standard deviations from the mean is x 126.07 for our sampling distribution? z x 0 X x 0 126.07 128 1.09 / n 15 / 72 This is called the z test statistic for the data, note it is just the z-score for the data!. The z-test statistic for our data tells us that our data differs from the hypothesized mean by z = -1.09 standard deviations (assuming the null hypothesis is true). What other values of the z-test statistic are as extreme as our data’s test statistic (i.e. differ by at least as many standard deviations from the hypothesized mean as our data)? Note that our alternative hypothesis is H a : 128 . z < -1.09 OR z > 1.09 (This is a two-tailed test!) How will this z test statistic be distributed (Hint: We are standardizing a variable that is approximately normal: x !)??? This z test statistic has an approximately standard normal distribution (mean=0, standard deviation=1) How likely is it to get a result “as extreme” as our data? P-value Let’s compute the P-value for our test two ways: 1. Using the invNorm key: 2. Using the Stat|Tests|Z-Test key: Our data is not too “rare,” thus it will not cause us reject the null hypothesis in favor of the alternative hypothesis. P-value Typical levels in the “real world” are 0.10 0.05 0.01 Most statistical software will report the P-value – but will not tell you what conclusion to reach! That is the hardest part! Steps in Hypothesis Testing (page 407) OR What Have We Done (in Example 6.14)? • State the null and alternative hypothesis (clearly identify the population parameter!): Where is the mean H 0 : 128 H a : 128 systolic b.p. of middleaged male executives. • Calculate the value of the test statistic on which the test will be based: x 0 x 0 126.07 128 z 1.09 X / n 15 / 72 • Find the P-value for the observed data: P=0.2758 • State a conclusion: Since P is large, we will fail to reject the null hypothesis in favor of the alternative (i.e. it is not very unlikely to get a result as extreme as ours). Thus the data do not provide strong evidence that the mean systolic b.p. of middle-aged male executives differs significantly from the mean of other men (i.e. 128). We Have Just Conducted a (two-tailed) z-test for a Population Mean, ! Assumptions (see page 393): • Data from a SRS of the population. •Population standard deviation is known (i.e. known). •Data does not have extreme outliers (since x not resistant to outliers) •The smaller n is, the more concerned we need to be about the population distribution and outliers. One-tailed Test One-tailed Test Two-tailed Test Page 410 Let’s Work Another Example: Example 6.15 page 412 • State the null and alternative hypothesis (clearly identify the population parameter!): • Calculate the value of the test statistic on which the test will be based: • Find the P-value for the observed data: • State a conclusion: Relationship Between Two-Sided Significance Tests and Confidence Intervals Let’s Revisit Example 6.15 page 412: •What if our alternative hypothesis was two sided? What would be the P-value of the test? •Would you reject the null hypothesis at any of the standard alpha levels? •Find the 1 -level confidence intervals for using the standard alpha levels. •Which confidence intervals computed above contain the value of 0 stated in the null hypothesis of the test? Section 6.3 Use and Abuse of Tests • Read on Your Own! • You will have a hand-in homework assignment from this section. • You will be asked questions about this material on future tests and quizzes. Section 6.4 Power and Inference as a Decision* • • • • • Type I and Type II Errors The Power of a Statistical Hypothesis Test Increasing the Power of a Test Significance and Type I Errors Power and Type II Errors *Optional Section Possible Errors in Hypothesis Testing Type I and Type II Errors Page 436 An Example Page 435 H 0 : Lot of bearings meets standards H a : The lot does not meet standards More on Type I and Type II Error – Example 6.28 H0 : 0 Ha : 0 What is the likelihood of a Type I Error? 0.05 Test at 0.05 level of significance. Reject null if z-test statistic is greater than what? Reject if get a sample mean greater than what? H 0 TRUE If it is true that 1 , then what is the likelihood of a Type II Error? 0.20 If it is true that 1 , then what is the likelihood of correctly rejecting the null hypothesis? 0.80 1 TRUE Power, Significance, and Type I and Type II Errors