STT 200 – Lecture 5, section 23,24 Recitation 13 (4/9/2013)

Slides:



Advertisements
Similar presentations
STT 200 – L ECTURE 1, SECTION 2,4 R ECITATION 13 (11/27/2012) TA: Zhen (Alan) Zhang Office hour: (C500 WH) 1:45 – 2:45PM Tuesday (office.
Advertisements

5.1 day 2 Simulations! .
STT 200 – L ECTURE 5, SECTION 23,24 R ECITATION 11 (3/26/2013) TA: Zhen Zhang Office hour: (C500 WH) 3-4 PM Tuesday (office tel.:
Introduction to Basic Statistical Methodology. CHAPTER 1 ~ Introduction ~
Copyright © 2006 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
STT 200 – L ECTURE 1, SECTION 2,4 R ECITATION 11 (11/13/2012) TA: Zhen (Alan) Zhang Office hour: (C500 WH) 1:45 – 2:45PM Tuesday (office.
9.2a Tests about a Population Proportion Target Goal: I can check the conditions for carrying out a test about a population proportion. I can perform a.
Conditional Probability and Independence. Learning Targets 1. I can calculate conditional probability using a 2-way table. 2. I can determine whether.
Analyze the Data.  What did we learn from the data?  Does this sample convince you that more than half of all customers at this store are female? 
STT 200 – L ECTURE 1, SECTION 2,4 R ECITATION 14 (12/4/2012) TA: Zhen (Alan) Zhang Office hour: (C500 WH) 1:45 – 2:45PM Tuesday (office.
SECTION 12.2 Tests About a Population Proportion.
Newer Sports at LHS Ice Hockey Men’s Volleyball Fencing (club) Coin Flipping.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide
Hypothesis Tests for Means The context “Statistical significance” Hypothesis tests and confidence intervals The steps Hypothesis Test statistic Distribution.
 Binomial distributions for sample counts  Binomial distributions in statistical sampling  Finding binomial probabilities  Binomial mean and standard.
What Is the Probability? The chance that something will happen is called probability. For example, if you toss a penny, what is the probability that it.
Testing a Claim I’m a great free-throw shooter!. Significance Tests A significance test is a formal procedure for comparing observed data with a claim.
Chapter 3 Investigating Independence Objectives Students will be able to: 1) Understand what it means for attempts to be independent 2) Determine when.
Introduction to Probability and Statistics Thirteenth Edition Chapter 5 Several Useful Discrete Distributions.
MATB344 Applied Statistics Chapter 5 Several Useful Discrete Distributions.
IE241 Problems. 1. Three fair coins are tossed in the air. What is the probability of getting 3 heads when they land?
+ The Practice of Statistics, 4 th edition – For AP* STARNES, YATES, MOORE Unit 5: Hypothesis Testing.
+ The Practice of Statistics, 4 th edition – For AP* STARNES, YATES, MOORE Chapter 9: Testing a Claim Section 9.1 Significance Tests: The Basics.
Confidence intervals are one of the two most common types of statistical inference. Use a confidence interval when your goal is to estimate a population.
CHAPTER 9 Testing a Claim
AP Statistics February Coin Flipping Example  On a scrap paper record the results of my coin flips. 2.
CHAPTER 15: Tests of Significance The Basics ESSENTIAL STATISTICS Second Edition David S. Moore, William I. Notz, and Michael A. Fligner Lecture Presentation.
CHAPTER 9 Testing a Claim
Essential Questions How do we use simulations and hypothesis testing to compare treatments from a randomized experiment?
STATISTIC & INFORMATION THEORY (CSNB134) MODULE 7A PROBABILITY DISTRIBUTIONS FOR RANDOM VARIABLES (BINOMIAL DISTRIBUTION)
STT 200 – L ECTURE 1, SECTION 2,4 R ECITATION 12 (11/20/2012) TA: Zhen (Alan) Zhang Office hour: (C500 WH) 1:45 – 2:45PM Tuesday (office.
+ The Practice of Statistics, 4 th edition – For AP* STARNES, YATES, MOORE Unit 5: Hypothesis Testing.
Results: How to interpret and report statistical findings Today’s agenda: 1)A bit about statistical inference, as it is commonly described in scientific.
Section 10.2: Tests of Significance Hypothesis Testing Null and Alternative Hypothesis P-value Statistically Significant.
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 9 Testing a Claim 9.2 Tests About a Population.
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 9 Testing a Claim 9.1 Significance Tests:
CHAPTER 15: Tests of Significance The Basics ESSENTIAL STATISTICS Second Edition David S. Moore, William I. Notz, and Michael A. Fligner Lecture Presentation.
Section 9.1 First Day The idea of a significance test What is a p-value?
Significance Tests: The Basics Textbook Section 9.1.
Statistics 11 Understanding Randomness. Example If you had a coin from someone, that they said ended up heads more often than tails, how would you test.
Chapter 9 Testing A Claim 9.1 SIGNIFICANT TESTS: THE BASICS OUTCOME: I WILL STATE THE NULL AND ALTERNATIVE HYPOTHESES FOR A SIGNIFICANCE TEST ABOUT A POPULATION.
+ Testing a Claim Significance Tests: The Basics.
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 9 Testing a Claim 9.1 Significance Tests:
Warm-up What is the best way to answer each of the questions below: an experiment, a sample survey, or an observational study that is not a sample survey?
!! DRAFT !! STA 291 Lecture 14, Chap 9 9 Sampling Distributions
Section 5.1 Day 2.
Statistics Introduction Activity
Unit 5: Hypothesis Testing
Warm Up Check your understanding p. 541
CHAPTER 9 Testing a Claim
Game Theory “How to Win the Game!”.
Inference for Proportions
CHAPTER 9 Testing a Claim
Consider This… I claim that I make 80% of my basketball free throws. To test my claim, you ask me to shoot 20 free throws. I make only 8 out of 20.
Experimental probability
CHAPTER 9 Testing a Claim
The Binomial and Geometric Distributions
Probability Die Difference and Uncertainty
CHAPTER 9 Testing a Claim
Significance Tests: The Basics
CHAPTER 9 Testing a Claim
CHAPTER 9 Testing a Claim
CHAPTER 9 Testing a Claim
CHAPTER 9 Testing a Claim
CHAPTER 9 Testing a Claim
CHAPTER 9 Testing a Claim
CHAPTER 9 Testing a Claim
CHAPTER 9 Testing a Claim
Statistics and Probability-Part 5
CHAPTER 9 Testing a Claim
Presentation transcript:

STT 200 – Lecture 5, section 23,24 Recitation 13 (4/9/2013) TA: Zhen Zhang zhangz19@stt.msu.edu Office hour: (C500 WH) 3-4 PM Tuesday (office tel.: 432-3342) Help-room: (A102 WH) 9:00AM-1:00PM, Monday Class meet on Tuesday: 12:40 – 1:30PM A224 WH, Section 23 1:50 – 2:40PM A234 WH, Section 24

Example (sampling distribution and confidence interval) Recall that the data we have last time contain “yes/no” responses from a population of 400 persons who were asked if they have wireless internet access at home. The population proportion of “yes” 𝑝 is 0.5575. We draw many random samples with size n, the sampling distribution of 𝑝 can be approximated by 𝑝 ~ 𝑁 𝑝, 𝑝(1−𝑝) 𝑛 If we really don’t know 𝑝, we draw sample with size n, obtain 𝑝 and construct 95% confidence interval using 𝑝 ± 𝑧 ∗ 𝑝 (1− 𝑝 ) 𝑛 . We are 95% confident that 𝑝 is between it.

Example (hypothesis testing) What if we have certain hypothesis on 𝑝, and want to test it? For instance, a survey in 2011 suggests that only 40% residents in this region have wireless internet access at their house. We want to test if this is true in the data we collected in 2012, or if there is a noticeable increment. That is: 𝐻 0 : 𝑝=0.4 versus 𝐻 𝐴 : 𝑝>0.4. We decide to draw a sample with size n=37 to conduct the proportion test. … But before that, we need to check several conditions.

Example (check conditions) To validate the proportion test, we need to check several conditions once we determine the sample size n: Independence condition: the n=37 responses in the sample are chosen independently. Randomness condition: the n=37 responses in the sample are chosen randomly. We used the table of random digits from 1 to 400. 10% condition: the sample size n=37 is less than 10% of the population size 400. Success/failure condition: Both n𝑝=37 0.4 =14.8 and n𝑞=37 1−0.4 1−0.4 =22.2 are greater than 10.

Example (hypothesis testing, continued) To test: 𝐻 0 : 𝑝=0.4 versus 𝐻 𝐴 : 𝑝>0.4. We draw a sample with size n=37, and obtain 𝑝 =0.5676. If 𝐻 0 is true, that is, 𝑝=0.4, then 𝑆𝐷 𝑝 = 𝑝(1−𝑝) 𝑛 = 0.4(1−0.4) 37 =0.081, and the z-score z= 𝑝 −𝑝 𝑆𝐷 𝑝 = 0.5676−0.4 0.081 =2.08 with P-value P z>2.08 = normal𝑐𝑑𝑓 2.08, 9 9 , 0, 1 =0.0187. Which means if really 𝑝=0.4, then an observed proportion as large as 0.5676 would occur at random only 19 times in 1000. With a P-value this small, we reject 𝐻 0 and conclude 𝑝>0.4. What if the hypotheses were: 𝐻 0 : 𝑝=0.4 versus 𝐻 𝐴 : 𝑝≠0.4? This becomes two-sided, and P-value becomes 2P z>2.08 =0.0374. and we will still reject 𝐻 0 if our significance level is 𝛼=0.05.

Interaction with confidence interval We can also construct the confidence interval for 𝑝 given significance level 𝛼: Determine confidence level C. For two-sided test ( 𝐻 𝐴 : 𝑝≠0.4), C=1−𝛼; For one-sided test ( 𝐻 𝐴 : 𝑝>0.4 or 𝐻 𝐴 : 𝑝<0.4 ), C=1−2𝛼. The critical value 𝑧 ∗ , either using Normal table, or qnorm((C+1)/2) in R, or invNorm((C+1)/2) in calculator. Find 𝑆𝐸 𝑝 = 𝑝 (1− 𝑝 ) 𝑛 . Note we use 𝑝 , not 𝑝, since it is 𝑆𝐸, not 𝑆𝐷. The margin of error is 𝑀𝐸= 𝑧 ∗ 𝑆𝐸 𝑝 = 𝑧 ∗ 𝑝 (1− 𝑝 ) 𝑛 The confidence interval is 𝑝 ±𝑀𝐸=( 𝑝 −𝑀𝐸, 𝑝 +𝑀𝐸), and check that whether 𝑝 is contained in this interval. In our example for 𝐻 0 : 𝑝=0.4 vs 𝐻 𝐴 : 𝑝>0.4, and 𝛼=0.05, we have C=90%, 𝑧 ∗ =1.645, 𝑆𝐸 𝑝 =0.0814, hence the 90% confidence interval is (0.4336, 0.7015), which is above 𝑝=0.4.

Errors and power Some important concepts : Type I error: reject 𝐻 0 when it is true. Type II error: accept 𝐻 0 when it is false. Power of the test: the probability of rejecting 𝐻 0 when it is false (i.e., when 𝐻 𝐴 is true). In our example for 𝐻 0 : 𝑝=0.4 vs 𝐻 𝐴 : 𝑝>0.4, and 𝛼=0.05, we will reject 𝐻 0 if we observe a z-score z=1.645, or a proportion 𝑝 =1.645×0.081+0.4=0.5332. Under the true proportion 𝐻 𝐴 : 𝑝=0.5575>0.4, 𝑝 ~ 𝑁 0.5575, 0.5575(1−0.5575) 37 =0.0817 , so the power of this test is 𝑃 𝑝 >0.5332 𝑝=0.5575 =𝑛𝑜𝑟𝑚𝑎𝑙𝑐𝑑𝑓 0.5332, 9 9 ,0.5575, 0.0817 =0.4357.

Question #1: Suppose we want to test whether a coin is fair. We toss it many times, count the proportion of heads, and find a P-value of 0.32. Which conclusion is appropriate? There’s a 32% chance that the coin is fair. There’s a 32% chance that the coin is not fair. There’s a 32% chance that natural sampling variation could produce coin-tossing results like these if the coin is really fair. There’s a 32% chance that natural sampling variation could produce coin-tossing results like these if the coin is not fair. Ans: we discussed in class.

Question #2: To test: 𝐻 0 : 𝑝=0.96 versus 𝐻 𝐴 : 𝑝≠0.96. Many people have trouble setting up all the features of their cell phones, so a company has developed what it hopes will be easier instructions. The goal is to have at least 96% of customers succeed. The company test it on 200 people, and 188 were successful. Is this a strong evidence that their system fails to meet the goal? A student’s test of this hypothesis is shown. How many mistakes can you find? To test: 𝐻 0 : 𝑝=0.96 versus 𝐻 𝐴 : 𝑝≠0.96. The sample is SRS, with 0.96(200)>10. 𝑝 = 188 200 =0.94. 𝑆𝐷 𝑝 = 0.94(0.06) 200 =0.017, and the z-score z= 0.96−0.94 0.017 =1.18 with P-value P z>1.18 = normal𝑐𝑑𝑓 1.18, 9 9 , 0, 1 =0.12. There is strong evidence that the new instructions do not work. Ans: we discussed in class.

Question #3: To test: 𝐻 0 : 𝑝=0.86 versus 𝐻 𝐴 : 𝑝<0.86. Many people have trouble setting up all the features of their cell phones, so a company has developed what it hopes will be easier instructions. The goal is to have at least 86% of customers succeed. The company test it on 100 people, and 93 were successful. Is this a strong evidence that their system fails to meet the goal? Our second student’s test of this hypothesis is shown. How many mistakes can you find? To test: 𝐻 0 : 𝑝=0.86 versus 𝐻 𝐴 : 𝑝<0.86. The sample is SRS, with 0.86(100)>10 and 0.14(100)>10 . 𝑝 = 93 100 =0.93. 𝑆𝐷 𝑝 = 0.86(0.14) 100 =0.0347, and the z-score z= 0.93−0.86 0.0347 =2.02 with P-value P z>2.02 = normal𝑐𝑑𝑓 2.02, 9 9 , 0, 1 =0.0217. Since this is significant under 𝛼=0.05, we reject 𝐻 0 and conclude there is strong evidence that the new instructions do not work. Ans: The only error is the P-value should be 𝑃 𝑧<2.02 =0.9783!

Question #4: A basketball player with a poor foul-shot record practices intensively during the off-season. He tells the coach that he has raised his proficiency from 60% to 80%. Dubious, the coach asks him to take 10 shots, and surprised when the player hits 9 out 10 shots. Did the player prove that he has improved? Suppose the player really is no better than before, still 60% shooter. What’s the probability he can hit at least 9 of 10 shots anyway? If that is what happened, now the coach thinks the player has improved when he has not. Which type of error is that? If the player really can hit 80% now, and it takes at least 9 out of 10 successful shots to convince the coach, what’s the power of the test? List two ways the coach and player could increase the power to detect any improvement.

Question #4 - solution: Suppose the player really is no better than before, still 60% shooter. What’s the probability he can hit at least 9 of 10 shots anyway? Let X be the number of shots he hits, which follows Binomial model with n=10 and p=0.6 under the null hypothesis. We have 𝑃 𝑋=9 = 10 9 0.6 9 0.4 1 =0.0403, and 𝑃 𝑋=10 = 10 10 0.6 10 0.4 0 = 0.6 10 = 0.0061, so 𝑃 𝑋≥9 =𝑃 𝑋=9 +𝑃 𝑋=10 =0.0464. If that is what happened, now the coach thinks the player has improved when he has not. Which type of error is that? The null hypothesis is that the player really is no better than before. So if the coach thinks the player has improved (reject the null hypothesis) when he actually has not (when the null hypothesis is true), this is Type I error.

Question #4 – solution (continued): If the player really can hit 80% now, and it takes at least 9 out of 10 successful shots to convince the coach, what’s the power of the test? The power is the probability that we reject the null hypothesis when it is false, i.e., the alternative is true. Since X the number of shots he hits follows Binomial model with n=10 and p=0.8 under the alternative hypothesis, we have 𝑃 𝑋=9 𝑋=9 = 10 9 0.8 9 0.2 1 =0.2684, and 𝑃 𝑋=10 = 10 10 0.8 10 0.2 0 = 0.8 10 =0.10737, so 𝑃 𝑋≥9 =𝑃 𝑋=9 +𝑃 𝑋=10 =0.376. List two ways the coach and player could increase the power to detect any improvement. Increases the number of shots but still accept the improvement when he hits more than or equal to 9 shots. Or keep the number of shots at 10, but increase 𝛼 by declaring that 8,9, or 10 will be deemed as having improved, then the power will be 𝑃 𝑋=8 +𝑃 𝑋=9 +𝑃 𝑋=10 which is larger than that calculated in c).

Thank you.