1 / 46

Chapter 9 Hypothesis Testing

Chapter 9 Hypothesis Testing. Chapter Outline. Developing Null and Alternative Hypothesis Type I and Type II Errors Population Mean: Known Population Mean: Unknown Population Proportion. Hypothesis Testing.

wschultz
Download Presentation

Chapter 9 Hypothesis Testing

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 9Hypothesis Testing

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

  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 Ho, is a tentative assumption about a population parameter. • The alternative hypothesis, denoted by Ha, is the opposite to the null hypothesis.

  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. 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 existing drug. • Null Hypothesis: The new drug does not lower bad cholesterol more than the existing drug.

  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. • Alternative Hypothesis: The label (the claim) is incorrect, i.e. the population average weight of the can is less than (< ) 2 lbs.

  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. 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. 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. Null and Alternative Hypotheses The average age of students has not increased with recent recruitment of non-traditional students. H0: 21 The average age of students has increased due to recent recruitment of non-traditional students. Ha:21 where:  = average age of students at the local university.

  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 Ho 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. Type II Error • A Type II error is accepting H0 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 H0’ and not ‘accept H0’.

  12. Type I and Type II Errors Actual Population Condition Conclusion of Hypothesis Testing H0 True (m< 12) H0 False (m > 12) Correct Decision Type II Error AcceptH0 (Concludem< 12) Type I Error Correct Decision RejectH0 (Conclude m > 12)

  13. p-Value Approach to One-Tailed Hypothesis Testing • 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 H0 if the p-value  .

  14. Critical Value Approach to One-Tailed Hypothesis Testing • 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 H0 if z< -z • Upper tail: Reject H0 if z>z

  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. Step 5. Reject H0 if p-value <.

  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 H0.

  17. 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. 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. One-Tailed Tests About A Population Mean: Known H0: 21 Ha:21 • Example: Student Age • Develop the hypothesis: • Specify the level of significance: • Compute the test statistic: a = .05

  19. 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%. 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 z 0 2.55

  20. One-Tailed Tests About A Population Mean: Known • p-Value Approach • Determine whether to reject H0 : Because p-value = 0.54%, which is < = 5%, we reject H0. 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. 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 H0 is only 5%.

  22. One-Tailed Tests About A Population Mean: Known • CriticalValue Approach • Determine the critical value and rejection rule. • Determine whether to reject H0. Because 2.55 > 1.645, we reject H0. 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 H0 if z> 1.645

  23. One-Tailed Tests About A Population Mean: Known • CriticalValue Approach 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 H0. z 0 1.645 2.55

  24. p-Value Approach to Two-Tailed Hypothesis Testing • Compute the p-value using the following steps: • Compute the value of the test statistic z; • 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 H0 if the p-value < .

  25. Critical Value Approach to Two-Tailed Hypothesis Testing • Determine the critical value using the following steps: • Half the level of significance ; • 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: Reject H0 if z< -z /2 or z>z /2.

  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. Two-Tailed Tests About A Population Mean: Known H0: = 30 mils Ha:  30 mils • Example: Paper Thickness • Formulate the hypotheses: 2. Specify the level of significance: 3. Compute the test statistic: a = .05

  28. Two-Tailed Tests About A Population Mean: Known • p-value Approach • 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 • Determine whether to reject H0: Because p-value = 0.2303, which is > = 0.05, we cannot reject H0. Hence, the sample data indicate that this paper product meets the specification, i.e. the average thickness is insignificantly different from 30 mils.

  29. Two-Tailed Tests About A Population Mean: Known • p-value Approach 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 H0. z -1.2 0 1.2

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

  31. Two-Tailed Tests About A Population Mean: Known • Critical Value Approach 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 H0. No Rejection Area z -1.96 0 1.96 1.2

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

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

  34. p-Values and the t Distribution • Most likely, you will not be able to determine the exactp-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. 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. One-Tailed Test About A Population Mean: Unknown H0: > 3.5 Ha: m < 3.5 • Example: Gas Price 1. Formulate the hypotheses: 2. Specify the level of significance:  =.05 3. Compute the value of the test statistic:

  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 H0: Because p-value < =.05, we reject H0. 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. 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 H0 if t < -1.69 5. Determine whether to reject H0: Because the test statistic = -2.5 < -1.69, we reject H0. Thus, we have reached the same conclusion as that from the p-value approach.

  39. One-Tailed Test About A Population Mean: Unknown • Critical Value Approach 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 H0. t t.05= -1.69 0 t = -2.5 For d.f. = 36-1 =35

  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 pmust take one of the following three forms (where p0 is the hypothesized value of the population proportion). H0: p>p0 H0: p<p0 H0: p = p0 Ha: p < p0 Ha: p > p0 Ha: p ≠ p0 One-tailed (lower-tail) One-tailed (upper-tail) Two-tailed

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

  42. Tests About A Population Proportion • Rejection Rule: p-Value Approach Reject H0 if p –value <a • Rejection Rule: Critical Value Approach H0: pp Reject H0 if z>z H0: pp Reject H0 if z< -z H0: pp Reject H0 if z< -z or z>z

  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. Two-Tailed Tests About A Population Proportion H0: p=.25 Ha: p.25 • Example: PC Market Share • Formulate the hypothesis: • Specify the level of significance: • Compute the test statistic: a = .05 a common error is using in this formula

  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 • Determine whether to reject H0. Because p-value = .2502 >  = .05, we cannot reject H0. The PC market share of APL has not been affected by the new competitors.

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

More Related