Survey

Transcript

Chapter 9 Hypothesis Tests Hypothesis Tests The logic behind a confidence interval is that if we build an interval around a sample value there is a high likelihood that the population value will be captured in the interval. The logic behind a hypothesis test is that if we build an interval around a hypothesized value and the sample value falls into that interval, the result is consistent with hypothesized value. If the sample value falls outside the interval it is inconsistent with the hypothesized value. Hypotheses Null hypothesis (H0) – The assumed value of the population parameter when conducting the test Alternative hypothesis (Ha) – The complement of the null hypothesis We don’t necessarily believe the null hypothesis is true, it is a benchmark we are going to test against. Forms of the Hypotheses One-tailed test to the left H0: m > m0 Ha: m < m0 One-tailed test to the right H0: m < m0 Ha: m > m0 Two-tailed test H0: m = m0 Ha: m ≠ m0 Hypothesis Tests State of the world Conclusion Accept H0 Reject H0 H0 is true H0 is false Correct conclusion Type II error Type I error Correct conclusion Hypothesis Tests We can never know if the test provided the correct answer, we can only control the probability of making a certain type of error. Level of significance – the probability of making a Type I error when the null hypothesis is true as an equality. Mechanics of a Hypothesis Test 1. 2. 3. 4. Define the null and alternative hypotheses Define the rule for rejecting the null hypothesis Calculate value from sample Reject or accept null hypothesis, state the implication Critical Value A value defining the boarder(s) of the rejection region. Test Statistic A value calculated from sample data that is used to determine whether to accept or reject the null hypothesis. Hypothesis Test with s Known 1. H0: m > m0 Ha: m < m0 2. Reject H0 if z < -za 3. xm z s n 4. Interpret result Hypothesis Test with s Known, Example A firm has started a wellness plan which provides support for employees to lose weight and stop smoking. In the past employees used 10 sick days per year and the standard deviation was 2 days. The firm wants to test whether the number of sick days has fallen with the significance level set at 5%. A sample of 100 employees was collected, the average number of sick days for the sample was 9. Hypothesis Test with s Known 1. H0: m > 10 Ha: m < 10 2. Reject H0 if z < -1.645 3. xm 9 10 1 z 5 s 2 .2 100 n 4. Reject H0. The test implies that the number of sick days has fallen. Hypothesis Test with s Unknown If s is unknown, then we use s to estimate s and we would need to use the t distribution in conducting the test. Again, the number of degrees of freedom would equal n-1. Hypothesis Test with s Unknown, Example A researcher wants to know if the amount workers are putting into tax sheltered retirement plans (like IRA and 401k accounts) has fallen. Last year the average monthly contribution into a tax-sheltered plan was $150. A sample of 101 workers is drawn. The average monthly contribution for the workers in the sample was $135, and the sample standard deviation was $50. Conduct the test with a 5% significance level. Hypothesis Test with s Unknown 1. H0: m > 150 Ha: m < 150 2. Reject H0 if t < -1.660 3. x m0 135 150 15 t 3.01 s 50 4.975 n 101 4. Reject H0. The evidence suggests that the amount of money contributed to taxsheltered programs has fallen. Hypothesis Test with s Unknown, Example Last year Medicare recipients spent an average of 4.5 days in the hospital. A researcher wants to test to see if the average has changed. He wants to conduct a test at the 5% significance level. A sample of 25 Medicare recipients is drawn and the sample mean is 5 days and the standard deviation is 2. Hypothesis Test with s Unknown 1. H0: m = 4.5 Ha: m ≠ 4.5 2. Reject H0 if t < -2.064 or t > 2.064 x m0 5 4.5 .5 3. t 1.25 s 2 .4 25 n 4. Accept H0. The evidence is not strong enough to reject H0, we would assume the average number of days in the hospital has not changed. Alternatives Ways of Conducting a Hypothesis Test • t scores • p values p Values A p value is the probability of drawing a value whose distance from the hypothesized value is greater than or equal to the sample value. The null hypothesis is rejected if p < a. In a onetailed test p is equal to the area in a single tail. In the case of a two-tailed test p equals the area in both tails that is as far away from the mean as the sample value. Comparisons of Rejection Rules Assume a one-tailed test in which a = .05 and z equals 2. Hypothesis Test using p-Value, s Unknown Last year Medicare recipients spent an average of 4.5 days in the hospital. A researcher wants to test to see if the average has changed. He wants to conduct a test at the 5% significance level. A sample of 25 Medicare recipients is drawn and the sample mean is 5 days and the standard deviation is 2. Hypothesis Test using p-Value, s Unknown 1. H0: m = 4.5 Ha: m ≠ 4.5 2. Reject H0 if p < .05 x m0 5 4.5 .5 3. t 1.25 s 2 .4 25 n p P(t 1.25) or P(t 1.25) .22 4. Accept H0. The evidence is not strong enough to reject H0, we would assume the average number of days in the hospital has not changed. Hypothesis Test with s Unknown, Example A researcher wants to know if the amount workers are putting into tax sheltered retirement plans (like IRA and 401k accounts) has fallen. Last year the average monthly contribution into a tax-sheltered plan was $150. A sample of 101 workers is drawn. The average monthly contribution for the workers in the sample was $135, and the sample standard deviation was $50. Conduct the test with a 5% significance level. Hypothesis Test with s Unknown 1. H0: m > 150 Ha: m < 150 2. Reject H0 if p < .05 3. x m0 135 150 15 t 3.01 s 50 4.975 n 101 p P(t 3.01) .00165 4. Reject H0. The evidence suggests that the amount of money contributed to taxsheltered programs has fallen. Summary of Rejection Rules z and t scores: The rejection rule is defined in terms of standard deviations p values: The rejection rule is defined in terms of probabilities Summary of Hypothesis Tests About a Population Mean Lower Tail Test Upper Tail Test Two-Tailed Test t score rejection rule H0: m > m0 Ha: m < m0 Reject H0 if t<-ta H0: m < m0 Ha: m > m0 Reject H0 if t>ta H0: m = m0 Ha: m ≠ m0 Reject H0 if t<-ta/2 or t>ta/2 p-value rejection rule Reject H0 if p<a* Reject H0 if p<a* Reject H0 if p < a ** Hypotheses * Where p is calculated using one tail ** Where p is calculated using both tails