STAT 110 - Section 5 Lecture 26 Professor Hao Wang University of South Carolina Spring 2012 Estimating p: (1) Point estimator pˆ (2) Confidence interval estimator • But, we do not know p! (If we did, we wouldn’t need to make a confidence interval…) So use in place of . This is an approximate 95% confidence interval for p. • CONFIDENCE INTERVAL FOR • An approximate 95% confidence interval for p is confidence interval interpretation • The "95%" in the confidence interval listed above represents a level of certainty about our estimate. • If we were to repeatedly make new estimates using exactly the same procedure (by drawing a new sample, conducting new interviews, calculating new estimates and new confidence intervals), the confidence intervals would contain the true value 95% of the time. • (modified from http://www.census.gov/did/www/saipe/methods/statecounty/ci .html A confidence interval for p pˆ (1 pˆ ) pˆ z value n z value 1 1.64 1.96 2.58 3 3.29 Percent Confidence 68.3% 90% 95% 99% 99.7% 99.9% Assume your 99.7% confidence interval for p is 0.07 0.06 0.01 to 0.13 What will your 68% confidence interval be? a) 0.07 0.01 0.06 to 0.08 b) 0.07 0.02 0.05 to 0.09 c) 0.07 0.03 0.04 to 0.10 Four more questions from last years Practice Exam 3 Hypothesis testing example 1 • James Bond insists that his martinis should be shaken, not stirred. A skeptical bartender tests Bond with 6 martinis (using six fair coin flip to determine which drinks to shake and which to stir). Bond errs on one and correctly identifies the other 5 before passing out. • Is this evidence sufficient to reject the null hypothesis that Bond cannot tell the difference and is merely guessing (i.e., his probability of correct identification p=0.5). To find out we test the null hypothesis H0: Bond is merely guessing versus alternative H1: Bond is not merely guessing. • Under the null hypothesis, what is the probability that Bond correctly identifies 5 or more out of the 6 martinis? • Based on the answer to the above question, what is your conclusion about Bond’s ability to tell the difference at the significance level 5%? Hypothesis testing example 2 • A company claims that it has only a 5% complaint rate for its products. A consumer protection group thinks the percent is higher. A survey of a random sample of 400 product owners shows that 33 had complaints is: • Assume that the company’s claim is true and that p is really 0.05 (5%). What is the probability that a of 8% or more would be observed? • This is an example of a Hypothesis Test. • The claim that p=0.05 is what is called the “Null Hypothesis”. • The probability 0.15% is called the “P-value”. It is similar to the probability in a criminal trial using DNA evidence… a small number is evidence against the “Null Hypothesis”. Chapter 22 – What is a Test of Significance • A hypothesis test checks sample data against a claim or assumption about the population. The claim or assumption being tested is called the null hypothesis such as: H0: p = 0.50 The null hypothesis is the status quo. It is always set up using an equal sign. The statement we are looking for evidence of is called the alternative hypothesis. Three possible alternate hypotheses for seeing if a coin was fair could be: 1) Ha: p < 0.50 or 2) Ha : p>0.50 or 3) Ha: p is not equal to 0.50 The alternative hypothesis is also called the experimental hypothesis. It is opposed to the null hypothesis. The p-value is used to summarize the amount of evidence we have against the null hypothesis. The p-value is the probability that we would see a statistic at least as extreme as the one observed if the null hypothesis was true. The smaller the p-value, the more evidence against the null hypothesis. The Level of significance ( a ) determines how much evidence against H0 we require to reject H0 and find in favor of the alternative hypothesis, Ha. If the p-value is less than a then we have statistically significant evidence against the null hypothesis. If the null hypothesis was really true, then the probability that you reject the null hypothesis is equal to a. So you should pick a to be the chance you are willing to take of rejecting H0 when it is really true. We can either: • Reject the null hypothesis and conclude the alternate is true. • Fail to reject the null hypothesis and not have enough evidence to say it is false. We never get to accept the null hypothesis and say that it is true! Example • A new drug is advertised as being 80% effective. A consumer advocacy group thinks that it isn’t that effective and is looking for evidence that it doesn’t work well. • What is the null hypothesis? • What is the alternate hypothesis? • Historically, 76% of students in an introductory psychology course have correctly answered the professor’s favorite test question on Freud. This semester the professor gave a randomly selected group of students an extra lecture on the subject and wants to see if it will help them do better on the question. • The null hypothesis (H0) should be: A) p < 0.76 D) p=0.76 B) p ≠ 0.76 E) p<0.24 C) p > 0.76 • Historically, 76% of students in an introductory psychology course have correctly answered the professor’s favorite test question on Freud. This semester the professor gave a randomly selected group of students an extra lecture on the subject and wants to see if it will help them do better on the question. • The alternate hypothesis (HA) should be: A) p < 0.76 D) p=0.76 B) p ≠ 0.76 E) p<0.24 C) p > 0.76 McDonalds claims their quarter-pounders weigh 0.25 pounds. A disgruntled customer thinks they’re being swindled and that they don’t weigh that much and wants to find out. The null hypothesis (H0) for testing this would be: A) m < 0.25 lbs. B) x = 0.25 lbs. x ≥ 0.25 lbs. E) x ≠ 0.25 lbs. D) C) m = 0.25 lbs. Recall that x is the mean of the sample. m (pronounced mu) is the symbol used for the mean of the population. McDonalds claims their quarter-pounders weigh 0.25 pounds. A disgruntled customer thinks they’re being swindled and that they don’t weigh that much and wants to find out. The alternate hypothesis (HA) for testing this would be: A) m < 0.25 lbs. D) m ≥ 0.25 lbs. B) m = 0.25 lbs. E) m ≠ 0.25 lbs. C) m > 0.25 lbs. A random sample of 100 quarter-pounders was weighed in order to test the null hypothesis H0: m=0.25 against the alternate hypothesis HA: m<0.25 . The average weight of the 100 burgers was 0.249 lbs. and the p-value was 0.1752. If a=0.05 we would A) Reject the null hypothesis and conclude the burgers were too light. B) Accept the null hypothesis and conclude the burgers weighed 0.25 lbs. on average. C) Conclude that we do not have enough evidence to say the burgers are too light. A random sample of 100 quarter-pounders was weighed in order to test the null hypothesis H0: m=0.25 against the alternate hypothesis HA: m<0.25 . The average weight of the 100 burgers was 0.231 lbs. and the p-value was 0.03851. If a=0.05 we would A) Reject the null hypothesis and conclude the burgers were too light. B) Accept the null hypothesis and conclude the burgers weighed 0.25 lbs. on average. C) Conclude that we do not have enough evidence to say the burgers are too light. McDonalds claims their quarter-pounders weigh 0.25 pounds. The manager thinks that the employees are wasting meat and making them too heavy. The alternative hypothesis (HA) for testing this would be that average weight (called m) is: A) m < 0.25 lbs. D) m ≤ 0.25 lbs. B) m = 0.25 lbs. E) m ≠ 0.25 lbs. C) m > 0.25 lbs. Identify the null hypothesis (HO) : a. No change in VOD b. Reduction in VOD c. Increase in VOD Identify the alternative hypothesis (HA) : a. No change in VOD b. Reduction in VOD Increase in VOD c. At what α-level would you be able to reject the null hypothesis using the circled p-value? A) ® =0.01 B) ® =0.05 C) ® =0.10