Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Power and Sample Size in Testing One Mean 1 Type I & Type II Error • Type I Error: reject the null hypothesis when it is true. The probability of a Type I Error is denoted by . • Type II Error: accept the null hypothesis when it is false and the alternative hypothesis is true. The probability of a Type II Error is denoted by . 2 Null hypothesis Decision True False Reject H0 Type I Error Correct Decision 1 Correct Decision 1 Type II Error Do not reject H0 3 A Population The serum cholesterol levels for all 20- to 24-year-old males of a certain population was claimed to be normally distributed with a mean of 180 mg/100ml and standard deviation is 46 mg/100ml. 4 Research Hypothesis Is the mean cholesterol level of the population of 20- to 74-year-olds higher than 180 mg/100ml ? H0: = 180 mg/100ml (or 180 mg/100ml) Ha: > 180 mg/100ml 5 Power of the Test 6 Power of the Test The power of the statistical test is the ability of the study as designed to distinguish between the hypothesized value and some specific alternative value. That is, the power is the probability of rejecting the null hypothesis if the null hypothesis is false. Power = P(reject H0 | H0 is false) Power = 1 The power is usually calculated given a simple alternative hypothesis: Ha: = 211 mg/100ml Power = P(reject H0 | Ha is true) 7 Assuming that we use a sample of size 25 and test the hypothesis with a level of significant = 0.05, what would be the and the power of the test, i.e. 1 ? If we take the critical value approach, the critical value would be 1.645. At the level of significant = 0.05, we would reject H0 if z 1.645. Rejection region Right tail area is 0.05 z 0 1.645 8 If a sample of size 25 is selected, what would be the critical value in terms of the mean cholesterol level? Rejection region Right tail area is 0.05 z 0 1.645 Rejection region x 180 195.1 ? 46 X N ( X 180, X ) 25 180 1.645 46 25 195.1 9 If the alternative hypothesis Ha: = a = 211 mg/100ml, what would be the probability of NOT rejecting H0, i.e. ? H0: 0 = 180 v.s. Ha: = 211 That is to say “how powerful can this test detect a 31 mg/100ml increase in average cholesterol level?” x 180 195.1 211 = ?0.042 Power of the test when sample size is 25: Power = 1 – = 1 – 0.042 = 0.958. 10 Assuming that we use a sample of size 100 and test the hypothesis with a level of significant = 0.05, what would be the and the power of the test, i.e. 1 ? Rejection region z Right tail area is 0.05 0 1.645 Rejection region x 180 187.6 ? 46 X N ( X 180, X ) 100 46 180 1.645 187.6 100 11 If we assume the actual population mean is 211 mg/100ml for Ha, what is the probability of accepting H0, i.e. ? x 180 187.6 211 =?0.00 = .05 Power of the test when sample size is 100: Power = 1 – ?1 – 0 1 Recall that the power was .958 when sample size 12 was 25. n = 100 n = 25 x 180 187.6 211 195.1 13 Sample Size Estimation 14 H0: = 180 mg/100ml (or 180 mg/100ml) v.s. HA: > 180 mg/100ml, to perform a test at the power level of 0.95, with the level of significance of 0.01, how large a sample do we need? (Power of 0.95 means we want to risk a 5% chance of failing to reject the null hypothesis if the true mean is as large as 211 mg/100ml. Or, to say, we want to have a 95% chance of rejecting the null hypothesis if the true mean is as large as 211 mg/100ml.) 15 x 180 = 0.05 211 = .01 16 Let the unknown sample size to be n. If = .01, then the critical value in z-score would be 2.32. The critical value in average cholesterol level 46 would be x* 180 2.32 n If the true mean is 211 mg/100ml, with a power of 0.95, i.e. = .05, we would accept the null hypothesis when the sample average is less than 46 x* 211 1.645 n x 118 = 0.05 x * 211 = .01 17 x x * 211 Set the two equations equal to each other: 118 46 46 180 2.32 211 1.645 n n Solve for n: 2 (2.32 1.645)(46) n 34.6 211 180 So, the sample size needed is 35. 18 Formula: The estimated sample size for a onesided test with level of significance and a power of 1 to detect a difference of a – 0 is, ( z z ) n a 0 2 19 For a two-sided test, the formula is ( z / 2 z ) n a 0 2 20 Example: For testing hypothesis that H0: = 0 = 70 v.s. (Two-sided Test) Ha: 70 with a level of significance of = .05. Find the sample size so that one can have a power of 1 = .90 to reject the null hypothesis if the actual mean is a = 80. The standard deviation, , is approximately equal 15. 21 ( z / 2 z ) n a 0 = .05 1 = .90 = .10 2 z/2 = z.025 = 1.96 z = z.1 = 1.28 (1.96 1.28) 15 n 23.62 24 80 70 2 The sample size needed is 24. 22 Example: For testing hypothesis that H0: = 0 = 70 v.s. Ha: < 70 (One-sided Test) with a level of significance of = .05. Find the sample size so that one can have a power of 1 .95 to reject the null hypothesis if the actual mean is a 60 (or the actual difference in means is 10). The standard deviation, , is approximately equal 15. 23 Example: For testing hypothesis that H0: = 0 = 70 v.s. Ha: 70 (Two-sided Test) with a level of significance of = .05. Find the sample size so that one can have a power of 1 .95 to reject the null hypothesis if the actual mean is a 75. The standard deviation, , is approximately equal 15. 24