unit 3 foundations for inference lecture 3 decision
play

Unit 3: Foundations for inference Lecture 3: Decision errors, - PowerPoint PPT Presentation

Unit 3: Foundations for inference Lecture 3: Decision errors, significance levels, sample size, power, and bootstrapping Statistics 101 Thomas Leininger June 3, 2013 Decision errors Type 1 and Type 2 errors Decision errors Hypothesis tests


  1. Unit 3: Foundations for inference Lecture 3: Decision errors, significance levels, sample size, power, and bootstrapping Statistics 101 Thomas Leininger June 3, 2013

  2. Decision errors Type 1 and Type 2 errors Decision errors Hypothesis tests are not flawless. In the court system innocent people are sometimes wrongly convicted and the guilty sometimes walk free. Similarly, we can make a wrong decision in statistical hypothesis tests as well. The difference is that we have the tools necessary to quantify how often we make errors in statistics. Statistics 101 (Thomas Leininger) U3 - L4: Decision errors, significance levels, sample size, and power June 3, 2013 2 / 23

  3. Decision errors Type 1 and Type 2 errors Decision errors (cont.) There are two competing hypotheses: the null and the alternative. In a hypothesis test, we make a decision about which might be true, but our choice might be incorrect. Decision fail to reject H 0 reject H 0 H 0 true � Type 1 Error Truth H A true Type 2 Error � A Type 1 Error is rejecting the null hypothesis when H 0 is true. A Type 2 Error is failing to reject the null hypothesis when H A is true. We (almost) never know if H 0 or H A is true, but we need to consider all possibilities. Statistics 101 (Thomas Leininger) U3 - L4: Decision errors, significance levels, sample size, and power June 3, 2013 3 / 23

  4. Decision errors Type 1 and Type 2 errors Hypothesis Test as a trial If we again think of a hypothesis test as a criminal trial then it makes sense to frame the verdict in terms of the null and alternative hypotheses: H 0 : Defendant is innocent H A : Defendant is guilty Which type of error is being committed in the following cirumstances? Declaring the defendant innocent when they are actually guilty Declaring the defendant guilty when they are actually innocent Which error do you think is the worse error to make? “better that ten guilty persons escape than that one innocent suffer” – William Blackstone Statistics 101 (Thomas Leininger) U3 - L4: Decision errors, significance levels, sample size, and power June 3, 2013 4 / 23

  5. Decision errors Error rates & power Type 1 error rate As a general rule we reject H 0 when the p-value is less than 0.05, i.e. we use a significance level of 0.05, α = 0 . 05. This means that, for those cases where H 0 is actually true, we do not want to incorrectly reject it more than 5% of those times. In other words, when using a 5% significance level there is about 5% chance of making a Type 1 error. P ( Type 1 error ) = α This is why we prefer to small values of α – increasing α increases the Type 1 error rate. Statistics 101 (Thomas Leininger) U3 - L4: Decision errors, significance levels, sample size, and power June 3, 2013 5 / 23

  6. Decision errors Error rates & power Filling in the table... Decision fail to reject H 0 reject H 0 H 0 true 1 − α Type 1 Error, α Truth H A true Type 2 Error, β Power, 1 − β Type 1 error is rejecting H 0 when you shouldn’t have, and the probability of doing so is α (significance level) Type 2 error is failing to reject H 0 when you should have, and the probability of doing so is β (a little more complicated to calculate) Power of a test is the probability of correctly rejecting H 0 , and the probability of doing so is 1 − β In hypothesis testing, we want to keep α and β low, but there are inherent trade-offs. Statistics 101 (Thomas Leininger) U3 - L4: Decision errors, significance levels, sample size, and power June 3, 2013 6 / 23

  7. Decision errors Error rates & power A quick example In a cancer screening, what happens if we conclude a patient has cancer and they do in fact have cancer? What if they didn’t have cancer (but we concluded that they did)? What if we conclude the patient has cancer but we conclude that they do not have cancer? Statistics 101 (Thomas Leininger) U3 - L4: Decision errors, significance levels, sample size, and power June 3, 2013 7 / 23

  8. Decision errors Error rates & power Type 2 error rate If the alternative hypothesis is actually true, what is the chance that we make a Type 2 Error, i.e. we fail to reject the null hypothesis even when we should reject it? The answer is not obvious. If the true population average is very close to the null hypothesis value, it will be difficult to detect a difference (and reject H 0 ). If the true population average is very different from the null hypothesis value, it will be easier to detect a difference. Clearly, β depends on the effect size ( δ ) Statistics 101 (Thomas Leininger) U3 - L4: Decision errors, significance levels, sample size, and power June 3, 2013 8 / 23

  9. Decision errors Power Example - Blood Pressure Blood pressure oscillates with the beating of the heart, and the systolic pressure is defined as the peak pressure when a person is at rest. The average systolic blood pressure for people in the U.S. is about 130 mmHg with a standard deviation of about 25 mmHg. We are interested in finding out if the average blood pressure of employees at a certain company is greater than the national average, so we collect a random sample of 100 employees and measure their systolic blood pressure. What are the hypotheses? We’ll start with a very specific question – “What is the power of this hypothesis test to correctly detect an increase of 2 mmHg in average blood pressure?” Statistics 101 (Thomas Leininger) U3 - L4: Decision errors, significance levels, sample size, and power June 3, 2013 9 / 23

  10. Decision errors Power Problem 1 Which values of ¯ x represent sufficient evidence to reject H 0 ? (Remember H 0 : µ = 130, H A : µ > 130) Statistics 101 (Thomas Leininger) U3 - L4: Decision errors, significance levels, sample size, and power June 3, 2013 10 / 23

  11. Decision errors Power Problem 2 What is the probability that we would reject H 0 if ¯ x did come from N ( mean = 132 , SE = 2 . 5 ) . Statistics 101 (Thomas Leininger) U3 - L4: Decision errors, significance levels, sample size, and power June 3, 2013 11 / 23

  12. Decision errors Power Putting it all together Null distribution 120 125 130 135 140 Systolic blood pressure Statistics 101 (Thomas Leininger) U3 - L4: Decision errors, significance levels, sample size, and power June 3, 2013 12 / 23

  13. Decision errors Power Putting it all together Null Power distribution distribution 120 125 130 135 140 Systolic blood pressure Statistics 101 (Thomas Leininger) U3 - L4: Decision errors, significance levels, sample size, and power June 3, 2013 12 / 23

  14. Decision errors Power Putting it all together Null Power distribution distribution 0.05 120 125 130 135 140 Systolic blood pressure Statistics 101 (Thomas Leininger) U3 - L4: Decision errors, significance levels, sample size, and power June 3, 2013 12 / 23

  15. Decision errors Power Putting it all together Null Power distribution distribution 134.125 0.05 120 125 130 135 140 Systolic blood pressure Statistics 101 (Thomas Leininger) U3 - L4: Decision errors, significance levels, sample size, and power June 3, 2013 12 / 23

  16. Decision errors Power Putting it all together Null Power distribution distribution Power 134.125 0.05 120 125 130 135 140 Systolic blood pressure Statistics 101 (Thomas Leininger) U3 - L4: Decision errors, significance levels, sample size, and power June 3, 2013 12 / 23

  17. Decision errors Power Achieving desired power There are several ways to increase power (and hence decrease type 2 error rate): Increase the sample size. 1 Decrease the standard deviation of the sample, which essentially 2 has the same effect as increasing the sample size (it will decrease the standard error). Increase α , which will make it more likely to reject H 0 (but note 3 that this has the side effect of increasing the Type 1 error rate). Consider a larger effect size δ . 4 Statistics 101 (Thomas Leininger) U3 - L4: Decision errors, significance levels, sample size, and power June 3, 2013 13 / 23

  18. Decision errors Power Choosing sample size for a particular margin of error If I want to predict the proportion of US voters who approve of Presi- dent Obama and I want to have a margin of error of 2% or less, how many people do I need to sample? Given desired error level m , we need m ≥ ME = z ⋆ σ 1 √ n . To get m ≥ z ⋆ σ √ n , I need 2 n ≥ Note: This requires an estimate of σ . Statistics 101 (Thomas Leininger) U3 - L4: Decision errors, significance levels, sample size, and power June 3, 2013 14 / 23

  19. Bootstrapping Rent in Durham A random sample of 10 housing units were chosen on http://raleigh. craigslist.org after subsetting posts with the keyword “durham”. The dot plot below shows the distribution of the rents of these apartments. Can we apply the methods we have learned so far to construct a con- fidence interval using these data. Why or why not? ● ● ● ● ● ● ● ● ● ● 600 800 1000 1200 1400 1600 1800 rent Statistics 101 (Thomas Leininger) U3 - L4: Decision errors, significance levels, sample size, and power June 3, 2013 15 / 23

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend