Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 If we live with a deep sense of gratitude, our life will be greatly embellished.

Similar presentations


Presentation on theme: "1 If we live with a deep sense of gratitude, our life will be greatly embellished."— Presentation transcript:

1 1 If we live with a deep sense of gratitude, our life will be greatly embellished.

2 2 Hypothesis Test I: Z tests Logic of hypothesis test Rejection region and p-value Test for one proportion Test for two proportions

3 3 Example: New Drug A pharmaceutical company wants to be able to claim that for its newest medication the proportion of patients who experience side effects is less than 20%. Q. What are the two possible conclusions (hypotheses) here?

4 4 The Logic of Hypothesis Test “Assume Ho is a possible truth until proven false” Analogical to “Presumed innocent until proven guilty” The logic of the US judicial system

5 5 Steps in Hypothesis Test 1. Determine the null (Ho) and alternative (Ha) hypotheses 2. Find an appropriate test statistic and pre-set the level of significance (called  level) 3. Assuming Ho is true, find rejection region. 4. Reject Ho if the test statistic falls into the rejection region. 5. Report the result in the context of the situation Alternative steps for 3 & 4: 3. Assuming Ho is true, find p-value. 4. Reject Ho if p-value <  level.

6 6 Determine Ho and Ha Ho: nothing is happening (no relationship, no difference,…) Ha: something is happening (there is a relationship, there is a difference, …) Rule of Thumb: The “=“ sign must be in Ho. If possible, set what we hope to prove as Ha.

7 7 Example p = % of users who will experience side effects Q. What are Ho and Ha here?

8 8 Example Logic: Assume Ho is possibly true until proven false. Data:17% of 400 patients who have experienced side effects How likely is if Ho is true (p>20%)? If very unlikely  reject Ho If not very unlikely  cannot reject Ho

9 9 Rejection Region How extreme (i.e. unlikely) is the observation is too extreme? Rejection Region is the region when the test statistic falls in, we will “reject Ho” The rejection region is the most extreme region, determined by the  level and the type of Ha

10 10 Good! Good!(Correct!) H 0 trueH 0 false Type II Error, or “  Error” Type I Error, or “  Error” Good! Good!(Correct) we accept H 0 we reject H 0 Two Types of Errors

11 Level of Significance Level of significance also called a level is the largest tolerable type I error rate Example of rejection region for a given a level 11

12 12 P-Value p-value is the smallest type I error rate if we reject Ho at the observed value That is, p-value is the probability of seeing as extreme as (or more extreme) what we observe, given Ho is true. The smaller p-value is, the less likely that what we observe will occur given Ho is true. That is, smaller p-value means stronger evidence against Ho.

13 13 P-Value The level of significance (called  level) is usually 0.05 p-value >   fail to reject Ho (??) p-value <   reject Ho (= accept Ha)

14 14 Report the Conclusion Reject Ho: the data shows strong evidence supporting Ha Eg. The data shows strong evidence that the proportion of users who will experience side effects is less than 20%. Fail to reject Ho: the data does not provide sufficient evidence supporting Ha Eg. Based on the data, there is not sufficient evidence to support the proportion is less than 20%

15 15 Testing Hypotheses about a Proportion Three possible Ho and Ha HoHaType p = po Two-sided p > pop < poOne-sided (lower-tailed) p < pop > poOne-sided (upper-tailed) Write them all as p=po in the future

16 16 The z-test for a Proportion When 1) the sample is a random sample 2) n(po) and n(1-po) are both at least 5, an appropriate test statistic for p is

17 17 Computing the p-Value for the Z-Test

18 18 Computing the p-Value for the Z-Test

19 19 Computing the p-Value for the Z-Test P-value = P(|Z| > |z*| )= 2 x P(Z > |z*|)

20 20 Example: New Drug (Conti.) 1. Ho: p > 20%vs.Ha: p < 20% 2. Z-test statistic;  3. Find rejection region or p-value 4. Decide if reject Ho or not 5. Report the conclusion in the context of the situation

21 21 Hypothesis Test for the Difference of Two Population Proportions Step 1. Set up hypotheses Ho: p1 = p2 and three possible Ha’s: Ha: p1 = p2 (two-tailed) or Ha: p1 < p2 (lower-tailed) or Ha: p1 > p2 (upper-tailed)

22 22 Hypothesis Test for the Difference between Two Population Proportions Step 2. calculate test statistic where

23 23 Hypothesis Test for the Difference between Two Population Proportions Step 3: Find p value 1. Must be two independent random samples; both are large samples: And 2.When the above conditions are met, use Z- Table to find p-value.

24 24 Example: Bike to School For 80 randomly selected men, 30 regularly bicycled to campus; while for 100 randomly selected women, 20 regularly bicycled to campus. Find the p-value for testing: Ho: p1 = p2 vs. Ha: p1 > p2 Answer: z=2.60, p=0.0047 1: men; 2: women


Download ppt "1 If we live with a deep sense of gratitude, our life will be greatly embellished."

Similar presentations


Ads by Google