Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hypothesis Tests for 1-Proportion Presentation 9.

Similar presentations


Presentation on theme: "Hypothesis Tests for 1-Proportion Presentation 9."— Presentation transcript:

1 Hypothesis Tests for 1-Proportion Presentation 9

2 Methods of Statistical inference A. Confidence Intervals. From Chapter 10, we have seen that the basic construction involves a point estimate of the parameter of interest plus/minus some error. From Chapter 10, we have seen that the basic construction involves a point estimate of the parameter of interest plus/minus some error. C.I's allows us to estimate an unknown quantity (e.g. population proportion) with some degree of certainty using an interval. C.I's allows us to estimate an unknown quantity (e.g. population proportion) with some degree of certainty using an interval. B. Hypothesis testing. Rather than reporting an interval estimate, a researcher might have a preconceived notion or claim regarding a population parameter. This is called the research or alternative hypothesis. (A statement that something is happening.) Rather than reporting an interval estimate, a researcher might have a preconceived notion or claim regarding a population parameter. This is called the research or alternative hypothesis. (A statement that something is happening.) The status quo, or negation of the alternative hypothesis is called the null hypothesis. (A statement that nothing is happening.) The status quo, or negation of the alternative hypothesis is called the null hypothesis. (A statement that nothing is happening.) A hypothesis test is setup in hopes of being able to reject the null hypothesis, denoted by H 0, and thereby accept the alternative hypothesis, denoted by H a. A hypothesis test is setup in hopes of being able to reject the null hypothesis, denoted by H 0, and thereby accept the alternative hypothesis, denoted by H a. In hypothesis testing, we assume that the null hypothesis is the possible truth until using the data we conclude otherwise. In hypothesis testing, we assume that the null hypothesis is the possible truth until using the data we conclude otherwise. The "something is happening" hypothesis is chosen only when the data show us that we can reject the "nothing is happening" hypothesis. Utts and Heckart. The "something is happening" hypothesis is chosen only when the data show us that we can reject the "nothing is happening" hypothesis. Utts and Heckart.

3 Inference Steps 1.Decide what technique to use. Confidence Intervals and Hypothesis Tests: 1-Proportion1-Proportion 1-Mean1-Mean Difference between 2-ProportionsDifference between 2-Proportions Difference between 2-MeansDifference between 2-Means Hypothesis Tests: Hypothesis Tests: Difference between Paired Means.Difference between Paired Means. Chi-Square (Relationship between 2 Categorical Variables)Chi-Square (Relationship between 2 Categorical Variables) Regression (Relationship between 2 Quantitative Variables)Regression (Relationship between 2 Quantitative Variables) ANOVA (Difference between 3 or More Means)ANOVA (Difference between 3 or More Means) 2.Write the the null and alternative hypotheses (no need if you are interested in a confidence interval). 3.Check the conditions to make sure the technique is valid. 4.Calculate the p-value or CI. 5.Write an appropriate conclusion.

4 When do we Need Inference. Example 1: Some stockholders want to know if the mean salary for male employees in a large company is higher than the mean salary for female employees. The company allows them to access salary information from a random sample of 100 male and 100 female employees. The mean salaries are $41,000 for the males, and $39,500 for the females. Based on these means, can the shareholders determine that the mean salary for males in the company is higher than the mean salary for females? No, you would have to use an inference technique. A test of 2-means would work. Example 2: Suppose a new drug (Compound X) for fever relief is developed. The standard drug Tylenol reduces fever in 70% of patients. Compound X is administered to random 800 patients with fevers and 592 experience relief. Naturally the company that makes compound X wants to show that it is more effective than Tylenol. Based on the sample proportion 592/800=0.74, can the scientists determine that compound X works better than Tylenol? No, you would have to use an inference technique. A test of 1-proportion would work. No, you would have to use an inference technique. A test of 1-proportion would work.

5 Steps for a Hypothesis Tests for 1-Proportion Step 1: Write the null and alternative hypotheses. H 0 : p = p 0 H 0 : p = p 0 H a : p ≠ p 0 or p > p 0 or p p 0 or p < p 0  It ’ s important to specify the form of the H a, but not of the H 0 (we will see why). So the H 0 will always be of the form “ equal to ”.  Hypothesis tests can be 1-sided (Ha: p> p 0 or p p 0 or p < p 0 ) or 2-sided (H a : p ≠ p 0 ).  H a is the hypothesis the investigator wants to claim as true, or wants evidence for. Step 2: Check the conditions for a valid test. 1. The sample is a random sample from the population of interest. 2. Both np 0 and n (1-p 0 ) must be ≥ to 10.

6 Steps for a Hypothesis Tests for 1-Proportion Step 3: Calculate the test statistic and the p-value. The logic in hypothesis testing is to assume that H 0 is true until we prove otherwise.  The test-statistic is like the z-score of the sample estimate ( ) under the assumption that H 0 is true (i.e. p=p 0 ).  Note that if p truly equals p 0, and the conditions in Step 3 are valid, then the sampling distribution of is approximately normal with mean p 0 and standard deviation  Next we will see how the p-value is calculated under the assumption that H 0 is true!

7 Steps for a Hypothesis Tests for 1-Proportion Step 3: (Continue) What is the p-value? The p-value is the probability of getting a result as extreme (or more extreme) as the observed test statistic in the direction of H a, assuming H 0 is true. The p-value is the probability of getting a result as extreme (or more extreme) as the observed test statistic in the direction of H a, assuming H 0 is true. In other words, suppose that p truly is p 0, what is the chance (probability) that we would have In other words, suppose that p truly is p 0, what is the chance (probability) that we would have observed as extreme or more extreme than the one we observed. observed as extreme or more extreme than the one we observed. If this p-value (probability) is very low, then we say our data inconsistent with the null hypothesis and therefore we reject it. If this p-value (probability) is very low, then we say our data inconsistent with the null hypothesis and therefore we reject it.

8 Steps for a Hypothesis Tests for 1-Proportion Step 3: (Continue) Calculating the p-value. HaHaHaHap-value p < p 0 P(Z < z-stat) P(Z < z-stat) p > p 0 P(Z > z-stat) P(Z > z-stat) p ≠ p 0 2P(Z > |z-stat|) Note: p-value for a 2-sided alternative is twice the p-value for an 1-sided alternative. Note: p-value for a 2-sided alternative is twice the p-value for an 1-sided alternative.

9 Steps for a Hypothesis Tests for 1-Proportion 1-Sided Hypothesis Ha: p > po2-Sided Hypothesis Ha: p ≠ po Step 3: (Continue) Illustration of p-values. Suppose z-stat = 2.

10 Step 4: Decide whether the result is statistically significant based on the p-value. Based on the p-value we have two possible conclusions Based on the p-value we have two possible conclusions 1. If p-value < α, then reject H 0. and claim that H a is true. 2. If p-value > α, then fail to reject H 0 and claim that there isn't enough evidence to report H a is true. (In this case, we do not claim that the null is true!) α is the significance level (usually α = 0.05). Definition: The results are statistically significant if the p-value is less than α. Definition: The results are statistically significant if the p-value is less than α. Rejection region approach - An equivalent way to determine if we reject or not H 0 in favor using the z-stat instead of the p-value. Rejection region approach - An equivalent way to determine if we reject or not H 0 in favor using the z-stat instead of the p-value. e.g. for H a : p > p 0, α = 0.05, then reject H 0 if z-stat>1.96. e.g. for H a : p > p 0, α = 0.05, then reject H 0 if z-stat>1.96. See table one page 330 in the book for more examples. See table one page 330 in the book for more examples. WHY? Small p-value implies that assuming p=p 0, the probability of observing the result we have observed is small. The smaller the p- value is, the stronger the evidence is that p=p 0 is not the truth! Also, small p-value implies that z-stat is extreme in the direction of the alternative, thus we reject the H 0 in favor of H a. WHY? Small p-value implies that assuming p=p 0, the probability of observing the result we have observed is small. The smaller the p- value is, the stronger the evidence is that p=p 0 is not the truth! Also, small p-value implies that z-stat is extreme in the direction of the alternative, thus we reject the H 0 in favor of H a. Step 5: Report the conclusion in the context of the situation.

11 A Detailed Example Suppose a new drug (Compound X) for fever relief is developed. The standard drug Tylenol reduces fever in 70% of patients. Compound X is administered to random 800 patients with fevers and 592 experience relief. Naturally the company that makes compound X wants to show that it is more effective than Tylenol. Conduct an appropriate hypothesis test. Step 1. State the Null and Alternative Hypotheses H 0 : p =.7 H 0 : p =.7 H a : p >.7 H a : p >.7 Step 2. Check the conditions for the test to be valid.. 800(.7) = 592 800(.7) = 592 800(1-.7) = 208 800(1-.7) = 208 are ≥ 10, and we can assume that the sample is representative of the population. So the are conditions met. are ≥ 10, and we can assume that the sample is representative of the population. So the are conditions met.

12 Example Cont. Step 3. Calculate the test statistic and p-value.

13 Example Cont. Connection of p-value to the Sampling Distribution: Note that the p-value is calculated under the assumption that H 0 is true! If p =.7, then the sampling distribution of is normal with mean p =.7 and standard deviation =.0162 Connection of p-value to the Sampling Distribution: Note that the p-value is calculated under the assumption that H 0 is true! If p =.7, then the sampling distribution of is normal with mean p =.7 and standard deviation =.0162 The p-value equals the probability of getting a as extreme as.74 if the null were in fact true. That is, p-value = P( >.74) = P(Z>2.47) since 2.47 is the z-score of.74. Sampling Dist: P-value Shaded

14 Step 4. Decide whether the result is statistically significant based on the p-value. p-value =.0068 which is less than.05 so REJECT the null hypothesis! p-value =.0068 which is less than.05 so REJECT the null hypothesis! Step 5. Report the conclusion in the context of the situation. Since the p-value <.05, we have enough evidence to reject the null hypothesis and claim that the alternative is true. We conclude that the new drug Compound X IS MORE EFFECTIVE at relieving fever than the standard drug Tylenol. Example Cont.

15 Two-Types of Errors in Hypothesis Testing When we make our conclusion in a hypothesis test it is possible that we made one of two errors. When we make our conclusion in a hypothesis test it is possible that we made one of two errors. Type 1 Error: Occurs when the null hypothesis is actually true, but we reject it. Type 1 Error: Occurs when the null hypothesis is actually true, but we reject it. Type 2 Error: Occurs when the null hypothesis is actually false, but we fail to reject it. Type 2 Error: Occurs when the null hypothesis is actually false, but we fail to reject it. Correct Decision Type 2 Type 1 Correct Decision Truth H 0 H a Fail to Reject H 0 Reject H 0

16 Two-Types of Errors in Hypothesis Testing Type 1 and Type 2 errors do NOT occur due to a calculation mistake! They simply occur because we can never be 100% certain in our conclusion. Type 1 and Type 2 errors do NOT occur due to a calculation mistake! They simply occur because we can never be 100% certain in our conclusion. For example: Consider the Tylenol example. We argued that Compound X was better than Tylenol because 74% of patients had relief, and that the probability of getting that result by chance was VERY REMOTE (<1/100). It is POSSIBLE however that we made a Type 1 error. It is possible that Compound X has the same effectiveness as Tylenol and we just had a lucky sample. For example: Consider the Tylenol example. We argued that Compound X was better than Tylenol because 74% of patients had relief, and that the probability of getting that result by chance was VERY REMOTE (<1/100). It is POSSIBLE however that we made a Type 1 error. It is possible that Compound X has the same effectiveness as Tylenol and we just had a lucky sample. In statistics we are NEVER 100% certain, we just quantify the evidence, and use it to make an educated decision.

17 C.I’s and Two sided tests Suppose we are testing H 0 : p = p 0 vs. H a : p ≠ p 0 and we have an (1-α)100% CI for the same data. Suppose we are testing H 0 : p = p 0 vs. H a : p ≠ p 0 and we have an (1-α)100% CI for the same data. If the value of p 0 is not contained in the corresponding interval, then we can reject the null hypothesis at the α significance level. If the value of p 0 is not contained in the corresponding interval, then we can reject the null hypothesis at the α significance level. For α=.05, we are 95% confident that p is within an interval and the value p 0 is not in there...then we reject this hypothesis (H 0 : p = p 0 ) and claim the alternative is true. The probability of making Type 1 error is.05. For α=.05, we are 95% confident that p is within an interval and the value p 0 is not in there...then we reject this hypothesis (H 0 : p = p 0 ) and claim the alternative is true. The probability of making Type 1 error is.05.

18 Example: Statistical Significance vs Practical Significance In 1998, 24.2% of female high school students had tried ecstasy. In 2001, a major drug study is undertaken to determine if ecstasy use by teenage females is on the rise. As part of the study 50,000 random female students are asked whether or not they have ever used ecstasy. 12,280 of the females said yes. Has the proportion of female ecstasy users increased from 1998. H 0 : p =.242 vs H a : p >.242. H 0 : p =.242 vs H a : p >.242. p-value = P(Z > 1.89)=1- P(Z 1.89)=1- P(Z < 1.89) =.03038. <.05. Therefore, we reject the null hypothesis, and conclude that ecstasy use is greater than 24.2%. Therefore, we reject the null hypothesis, and conclude that ecstasy use is greater than 24.2%. The researches conclude that “Ecstasy Use Among Female High School Students is on the Rise”. This statement is misleading! Statistical significance says it is on the rise, but if you look at the actual proportion, 24.56%, for the 2001 sample, it is not much different than 24.2% from 1998. It might be statistically significant, it does not appear to be practically significant.


Download ppt "Hypothesis Tests for 1-Proportion Presentation 9."

Similar presentations


Ads by Google