Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Chapter 9 Hypothesis Testing. 2 Chapter Outline  Developing Null and Alternative Hypothesis  Type I and Type II Errors  Population Mean: Known 

Similar presentations


Presentation on theme: "1 Chapter 9 Hypothesis Testing. 2 Chapter Outline  Developing Null and Alternative Hypothesis  Type I and Type II Errors  Population Mean: Known "— Presentation transcript:

1 1 Chapter 9 Hypothesis Testing

2 2 Chapter Outline  Developing Null and Alternative Hypothesis  Type I and Type II Errors  Population Mean: Known  Population Mean: Unknown  Population Proportion

3 3 Hypothesis Testing  Just as Interval Estimation provides a range of possible values of population parameters, Hypothesis Testing is another method of making inference on population parameters using observed data.  Hypothesis testing is to determine whether a statement about the value of a population parameter should be rejected or not.  The null hypothesis, denoted by H o, is a tentative assumption about a population parameter.  The alternative hypothesis, denoted by H a, is the opposite to the null hypothesis.

4 4 Developing Null and Alternative Hypotheses  Formulating hypotheses is the first and foremost step in the hypothesis testing.  There are no absolute rules in developing hypotheses. But, generally speaking, we set the historical records, the established facts, or the claims as the null hypotheses. Hence, the new findings or observations, or challenges to the status quo are set as the alternative hypotheses.  It takes practice to formulate hypotheses correctly.

5 5 Developing Null and Alternative Hypotheses  Example 1: A new drug is developed with the goal of lowering bad cholesterol more than the existing drug. – Alternative Hypothesis: The new drug lowers bad cholesterol more than The new drug lowers bad cholesterol more than the existing drug. the existing drug. – Null Hypothesis: The new drug does not lower bad cholesterol more than the existing drug. The new drug does not lower bad cholesterol more than the existing drug.

6 6 Developing Null and Alternative Hypotheses  Example 2: The label on a can of powder milk states that it contains 2 pounds of powder milk. – Null Hypothesis: The label (the claim) is correct, i.e. the population average weight of the can is at least ( > ) 2 lbs. The label (the claim) is correct, i.e. the population average weight of the can is at least ( > ) 2 lbs. – Alternative Hypothesis: The label (the claim) is incorrect, i.e. the population average weight of the can is less than ( < ) 2 lbs. The label (the claim) is incorrect, i.e. the population average weight of the can is less than ( < ) 2 lbs.

7 7 Null and Alternative Hypotheses about A Population Mean  The equality part of the hypotheses always appears in the null hypothesis.  In general, a hypothesis test about the value of a population mean µ must take one of the following three forms (where µ 0 is the hypothesized value of the population mean). One-tailed(lower-tail)One-tailed(upper-tail)Two-tailed

8 8 Null and Alternative Hypotheses  Example: Student Age A local university recently have recruited more non- traditional students (students who have had some working experience). The university thinks it’s important to study the recent change in student composition in order to better meet students’ need. A local university recently have recruited more non- traditional students (students who have had some working experience). The university thinks it’s important to study the recent change in student composition in order to better meet students’ need. The student record office wants to formulate a hypothesis test that uses a sample of students to determine whether the average age of students is NOW significantly larger than 21. The student record office wants to formulate a hypothesis test that uses a sample of students to determine whether the average age of students is NOW significantly larger than 21.

9 9 Null and Alternative Hypotheses The average age of students has not increased with recent recruitment of non-traditional students. The average age of students has increased due to recent recruitment of non-traditional students. H a :  where:  = average age of students at the local university. university. H 0 : 

10 10 Type I Error  Because hypothesis testing is to use sample data to make inference on population parameters, we must allow for the possibility of errors.  A Type I error is rejecting H o when it is true.  The probability of making a Type I error when the null hypothesis is true as an equality is called the level of significance (denoted as ‘  ’).  Applications of hypothesis testing that only control the Type I error are often called significance tests.

11 11 Type II Error  A Type II error is accepting H 0 when it is false.  It is difficult to control for the probability of making a Type II error.  Statisticians avoid the risk of making a Type II error by using ‘do not reject H 0 ’ and not ‘accept H 0 ’.

12 12 Type I and Type II Errors CorrectDecision Type II Error CorrectDecision Type I Error Reject H 0 (Conclude  > 12) Accept H 0 (Conclude  < 12) H 0 True (  < 12) H 0 False (  > 12) Conclusion of HypothesisTesting Actual Population Condition

13 13 p-Value Approach to One-Tailed Hypothesis Testing p-value is the probability of obtaining a sample statistic that is at least as large as the observed one (in absolute value) if we assume that the null hypothesis is true.  The p-value is the probability of obtaining a sample statistic that is at least as large as the observed one (in absolute value) if we assume that the null hypothesis is true.  If the the p-value is less than or equal to the level of significance , the value of the test statistic falls into the rejection region.  Reject H 0 if the p-value  .

14 14 Critical Value Approach to One-Tailed Hypothesis Testing. Given the level of significance ,   Suppose the test statistic z has a standard normal probability distribution. Given the level of significance , we can find the corresponding z value with an area of  in the lower (or upper) tail of the distribution. This z value is called the Critical Value, and the tail area set by the z value is called the rejection area.  The rejection rule is: Lower tail: Reject H 0 if z < -z Lower tail: Reject H 0 if z < -z  Upper tail: Reject H 0 if z > z Upper tail: Reject H 0 if z > z 

15 15 Steps of Hypothesis Testing Step 1. Develop the null and alternative hypotheses. Step 2. Specify the level of significance . Step 3. Collect the sample data and compute the test statistic. p-Value Approach Step 4. Use the value of the test statistic to compute the p-value. p-value. Step 5. Reject H 0 if p-value < .

16 16 Steps of Hypothesis Testing Critical Value Approach Step 4. Use the level of significance  to determine the critical value and the rejection rule. Step 5. Use the value of the test statistic and the rejection rule to determine whether to reject H 0.

17 17  Known One-Tailed Tests About A Population Mean:  Known  Example: Student Age Continue with the example, the student record office randomly picked a sample of 49 students. The average age of the students in the sample is 23. Assume that the age pf student population has a standard deviation of 5.5 years. Continue with the example, the student record office randomly picked a sample of 49 students. The average age of the students in the sample is 23. Assume that the age pf student population has a standard deviation of 5.5 years. Please perform a hypothesis test, at 5% level of significance, to determine whether the average age of students is NOW significantly larger than 21. Please perform a hypothesis test, at 5% level of significance, to determine whether the average age of students is NOW significantly larger than 21.

18 18  Known One-Tailed Tests About A Population Mean:  Known  Example: Student Age 1.Develop the hypothesis: 2.Specify the level of significance: 3.Compute the test statistic: H 0 :  H a :   =.05

19 19  Known One-Tailed Tests About A Population Mean:  Known  p-Value Approach 4. Compute the p-value: Since this is an upper tail test, when z = 2.545, the upper tail area, i.e. the p-value = 0.0054=0.54%. 2.550 z The area to the left of 2.55 is 0.9946 The area to the right of 2.55 is 1-0.9946=0.0054

20 20  Known One-Tailed Tests About A Population Mean:  Known  p-Value Approach 5.Determine whether to reject H 0 : <  = 5%, we reject H 0. Because p-value = 0.54%, which is <  = 5%, we reject H 0. To conclude our hypothesis testing, the sample evidence indicates that due to recent recruitment of non-traditional students, the average age of student population is significantly higher than 21.

21 21  Known One-Tailed Tests About A Population Mean:  Known  p-Value Approach – Interpretation > > If the null hypothesis is true at equality, i.e.  = 21, the probability of observing a sample mean that is at least as large as 23 is 0.54% (the p-value). Since it is very unlikely to observe a sample mean > 23 but we did obtain 23 from the random sample, we should have a reasonable doubt on the null hypothesis. For all the other population mean values under the null hypothesis (  >21), the p-value will be even smaller, i.e. it is even MORE unlikely to observe a sample mean > 23. Therefore, we are very confident in rejecting the null hypothesis. Nevertheless, keep in mind that we could have made a mistake, though the chance that we wrongfully reject H 0 is only 5%.

22 22  Known One-Tailed Tests About A Population Mean:  Known  Critical Value Approach 4.Determine the critical value and rejection rule. 5.Determine whether to reject H 0. > 1.645, we reject H 0. Hence, we reach the same conclusion as that based on the p- value approach that the average age of student population is significantly higher than 21. Because 2.55 > 1.645, we reject H 0. Hence, we reach the same conclusion as that based on the p- value approach that the average age of student population is significantly higher than 21. For a =.05, z.05 = 1.645 Reject H 0 if z > 1.645

23 23  Known One-Tailed Tests About A Population Mean:  Known  Critical Value Approach 2.55 0 z The area to the right of 1.645 is 0.05, which is the rejection area. Our sample test statistic is 2.55, which falls into the rejection area. Hence, we reject the H 0. 1.645

24 24 p-Value Approach to Two-Tailed Hypothesis Testing  Compute the p-value using the following steps: 1.Compute the value of the test statistic z; 2.If z is positive, find the area under the standard normal curve to the right of z; If z is negative, find the area under the standard normal curve to the left of z. 3. Double the tail area obtained from last step to get the p-value.  The rejection rule: Reject H 0 if the p-value < .

25 25 Critical Value Approach to Two-Tailed Hypothesis Testing  Determine the critical value using the following steps: 1.Half the level of significance  ; 2.Use the standard normal distribution table to find z  /2, i.e. the z-value with an area of  /2 in the upper tail of the distribution.  The rejection rule: z z /2. Reject H 0 if z z  /2.

26 26 Two-Tailed Tests About A Population Mean:  Known  Example: Paper Thickness Clarion Paper Company makes various types of paper products. One of their products is a 30 mils thick paper. In order to ensure that the thickness of the paper meets the 30 mils specification, random cuts of paper are selected and the thickness of each cut is measured. A sample of 256 cuts had a mean thickness of 30.3 mils. Assuming the population standard deviation of paper thickness is known as 4 mils. Please perform a hypothesis test to determine if the average thickness of this particular paper product meets the 30 mils specification.

27 27 Two-Tailed Tests About A Population Mean:  Known  Example: Paper Thickness 1.Formulate the hypotheses: 2. Specify the level of significance: 3. Compute the test statistic: H 0 :  mils H a :  mils  =.05

28 28 Two-Tailed Tests About A Population Mean:  Known  p-value Approach 4.Compute the p-value: The area to the right of 1.2 is 1-0.8849 = 0.1151. So, p-value = 2  0.1151 = 0.2302 5.Determine whether to reject H 0 : Because p-value = 0.2303, which is >  = 0.05, we cannot reject H 0. Hence, the sample data indicate that this paper product meets the specification, i.e. the average thickness is insignificantly different from 30 mils.

29 29 Two-Tailed Tests About A Population Mean:  Known  p-value Approach 0 z The area to the right of 1.2 is 0.1151. The p-value is twice as much as this tail area, I.e. p-value = 2(0.1151) = 0.2302. Since the p-value is larger than the level of significance 5%, we cannot reject the H 0. 1.2-1.2

30 30 Two-Tailed Tests About A Population Mean:  Known  Critical Value Approach 4.Determine the critical value and rejection rule: For  = 5%, z  /2 = z 0.025 = 1.96. Reject H 0 if sample test statistic z >1.96 or < -1.96 5.Determine whether to reject H 0 : Because the test statistic 1.2 < 1.96, we cannot reject H 0, the same conclusion as that based on the p- value approach.

31 31 Two-Tailed Tests About A Population Mean:  Known  Critical Value Approach 1.2 0 z The areas to the right of 1.96 and to the left of –1.96 are combined to be 0.05, which are the rejection areas. Our sample test statistic is 1.2, which falls outside of the rejection areas. Hence, we cannot reject the H 0. 1.96-1.96 No Rejection Area

32 32 Tests About A Population Mean:  Unknown  Test Statistic This test statistic has a t distribution with n - 1 degrees of freedom. with n - 1 degrees of freedom.

33 33 Tests About A Population Mean:  Unknown  Rejection Rule: p-Value Approach Reject H 0 if p-value <   Rejection Rule: Critical Value Approach H 0 :   Reject H 0 if t > t  Reject H 0 if t < - t  Reject H 0 if t t  H 0 :   H 0 :  

34 34 p-Values and the t Distribution  Most likely, you will not be able to determine the exact p-value from the t distribution table in our textbook. However, you can still obtain a range for the p-value using the table, which is sufficient for you to determine whether or not to reject the null hypothesis.  Of course, when using a computer statistical software package, you can obtain the precise p- value for the t distribution.

35 35 One-Tailed Test About A Population Mean:  Unknown  Example: Gas Price The average gasoline price of one of the major oil companies has been $3.50 per gallon. Because of cost reduction measures, it is believed that there has been a significant reduction in the average price. In order to test this belief, the oil company randomly selected a sample of 36 of its gas stations and determined that the average price for the stations in the sample was $3.45 and the standard deviation of the sample is $0.12. Use  =.05 to test the hypothesis.

36 36 One-Tailed Test About A Population Mean:  Unknown  Example: Gas Price 1. Formulate the hypotheses: 2. Specify the level of significance:  =.05 3. Compute the value of the test statistic: H 0 :  > 3.5 H a :  < 3.5

37 37 One-Tailed Test About A Population Mean:  Unknown  p-Value Approach 4. Compute the p-value: Check the t distribution table. Because for the row corresponding to the degrees of freedom of 36-1 =35, the t = 2.5 is between 2.438 and 2.724, the p-value must be between.005 and.01, i.e.:.005 < p-value <.01 Please note that the t distribution table does not include negative t values. That’s because t distribution is symmetric around zero. 5. Determine whether to reject H 0: Because p-value <  =.05, we reject H 0. In conclusion, we are at least 95% confident that the average gas price has become lower than $3.5 per gallon and the cost reduction measures seem to have worked.

38 38 One-Tailed Test About A Population Mean:  Unknown  Critical Value Approach 4. Determine the critical value and rejection rule: For  =.05 and d.f. = 36-1 =35, t.05 = 1.69. Since our test is a lower tail test, the rejection rule is: Reject H 0 if t < -1.69 5. Determine whether to reject H 0: Because the test statistic = -2.5 < -1.69, we reject H 0. Thus, we have reached the same conclusion as that from the p-value approach.

39 39 One-Tailed Test About A Population Mean:  Unknown  Critical Value Approach t = -2.5 0 t The area to the right of -1.69 is 0.05, which is the rejection area. Our sample test statistic is -2.5, which falls into the rejection area. Hence, we reject the H 0. t.05 = -1.69 For d.f. = 36-1 =35

40 40 Null and Alternative Hypotheses about A Population Proportion  The equality part of the hypotheses always appears in the null hypothesis.  In general, a hypothesis test about the value of a population proportion p must take one of the following three forms (where p 0 is the hypothesized value of the population proportion). One-tailed(lower-tail)One-tailed(upper-tail)Two-tailed H 0 : p > p 0 H a : p < p 0 H 0 : p < p 0 H a : p > p 0 H 0 : p = p 0 H a : p ≠ p 0

41 41 Tests About A Population Proportion  Test Statistic assuming np > 5 and n(1 – p) > 5 where:

42 42 Tests About A Population Proportion  Rejection Rule: p-Value Approach H 0 : p  p  Reject H 0 if z > z  Reject H 0 if z < - z  Reject H 0 if z z  H 0 : p  p  Reject H 0 if p –value <   Rejection Rule: Critical Value Approach H 0 : p  p 

43 43 Two-Tailed Tests About A Population Proportion  Example: PC Market Share A popular computer company, APL, would like to find out if its market share has been affected recently due to the emergence of a few new competitors. The market share of APL in the PC market has been stably sitting at 25%. A survey was conducted on 100 PC buyers and it revealed that 20 out of 100 purchased the PCs made by APL. Please conduct a hypothesis test, at 5% level of significance, to determine if the PC market share of APL has changed.

44 44 Two-Tailed Tests About A Population Proportion  Example: PC Market Share 1.Formulate the hypothesis: 2.Specify the level of significance: 3.Compute the test statistic: H 0 : p=.25 H a : p .25  =.05 a common error is using in this formula in this formula

45 45 Two-Tailed Tests About A Population Proportion  p-Value Approach: 4. Compute the p-value: For z = -1.1547, the area to the left of z is.1251. So, p-value = 2 .1251=.2502 5.Determine whether to reject H 0. Because p-value =.2502 >  =.05, we cannot reject H 0. The PC market share of APL has not been affected by the new competitors.

46 46 Two-Tailed Tests About A Population Proportion  Critical Value Approach: 4.Determine the critical value and the rejection rule: For  =.05, z  /2 =z.025 =1.96 Reject H 0 if z 1.96 5.Determine whether to reject H 0. Because the test statistic –1.15 > -1.96 and < 1.96, we cannot reject H 0. The same conclusion is reached as that from the p-value approach.


Download ppt "1 Chapter 9 Hypothesis Testing. 2 Chapter Outline  Developing Null and Alternative Hypothesis  Type I and Type II Errors  Population Mean: Known "

Similar presentations


Ads by Google