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
BOBBY B. LYLE SCHOOL OF ENGINEERING EMIS - SYSTEMS ENGINEERING PROGRAM SMU EMIS 7370 STAT 5340 Department of Engineering Management, Information and Systems Probability and Statistics for Scientists and Engineers Tests of Hypothesis Basic Concepts & Tests of Proportions Dr. Jerrell T. Stracener 1 Tests of Hypothesis - Basic Concepts 2 Testing Hypotheses In many situations the reason for gathering and analyzing data is to provide a basis for deciding on a course of action. Let us assume that either of two courses of action is possible: A1 or A2, and that we would be clear whether one or the other is the better action, if only we knew the nature of a certain population - that is, if we knew the probability distribution of a certain random variable. 3 Testing Hypotheses The whole population or the distribution of probability is usually unattainable, therefore, we are forced to settle for such information as can be gleaned from a sample and to make our choice between the two actions on the basis of the sample. 1. Obtain random sample of size n 2. Apply decision rule to data 4 Testing Hypotheses Statistical Hypothesis - is a statement about a probability distribution and is usually a statement about the values of one or more parameters of the distribution. For example, a company may want to test the hypothesis that the true average lifetime of a certain type of TV is at least 500 hours, i.e., that 500. 5 Testing Hypotheses The hypothesis to be tested is called the null hypothesis and is denoted by H0. To construct a criterion for testing a given null hypothesis, an Alternative hypotheses, must be formed denoted by H1 or HA. Remark: To test the validity of a statistical hypothesis the test is conducted, and according to the test plan the hypothesis is rejected if the results are improbable under the hypothesis. If not, the hypothesis is accepted. The test leads to one of two possible actions: accept H0 or reject H0 (accept H1) 6 Testing Hypotheses Test Statistic - The statistic upon which a test of a statistical hypothesis is based. Critical Region - The range of values of a test statistic which, for a given test, requires the rejection of H0. Remark: Acceptance or rejection of a statistical hypothesis does not prove nor disprove the hypothesis! Whenever a statistical hypothesis is accepted or rejected on the basis of a sample, there is always the risk of making a wrong decision. The uncertainty with which a decision is made is measured in terms of probability. 7 Testing Hypotheses There are two possible decision errors associated with testing a statistical hypothesis: A Type I error is made when a true hypothesis is rejected. A Type II error is made when a false hypothesis is accepted. Decision Accept H0 Reject H0 (Accept H1) True Situation H0 true H0 false correct Type II error Type I error correct 8 Testing Hypotheses The decision risks are measured in terms of probability. = P(Type I error) = P(reject H0|H0 is true) = Producers risk = P(Type II error) = P(accept H0|H1 is true) = Consumers risk Remark: 100% is commonly referred to as the significance level of a test. 9 Testing Hypotheses Note: For fixed n, increases as decreases, and vice versa, as n increases, both and decrease. 10 Important Properties • The Type I error and Type II error are related. A decrease in the probability of one generally results in an increase in the probability of the other. • The size of the critical region, and therefore the probability of committing a Type I error, can always be reduced by adjusting the critical value(s). 11 Important Properties • An increase in the sample size n will reduce and simultaneously. • If the null hypothesis is false, is a maximum when the true value of a parameter approaches the hypothesized value. The greater the distance between the true value and the hypothesized value, the smaller will be. 12 P-Value • A p-value is the lowest level of significance at which the observed value of the test statistic is significant. • Reject H0 if the computed p-value is less than or equal to the desired level of significance . 13 Power Function Before applying a test procedure, i.e., a decision rule, we need to analyze its discriminating power, i.e., how good the test is. A function called the power function enables us to make this analysis. Power Function = PF() = PR() = P(rejecting H0|true parameter value) 14 Power Function A plot of the power function vs the test parameter value is called the power curve and 1 - power curve is the OC curve. ideal power curve PR() 1 0 H0 H1 15 Power of a Test • The power of a test can be computed as 1 - • Often different types of tests are compared by contrasting power properties 16 Power Function The power function of a statistical test of hypothesis is the probability of rejecting H0 as a function of the true value of the parameter being tested, say , i.e., PF() = PR() = P(reject H0|) = P(test statistic falls in CR|) 17 Operating Characteristic Function •The operating characteristic function of a statistical test of hypothesis is the probability of accepting H0 as a function of the true value of the parameter being tested, say , i.e., OC() = PA() = P(accept H0|) = P(test statistic falls in CA|) • Note that OC()=1-PF() 18 Summary Procedures for Hypothesis Testing 1. State the null hypothesis H0 that = 0 2. Choose an appropriate alternative hypothesis H1 from one of the alternatives < 0, > 0, or 0 3. Choose a significance level of size . 4. Select the appropriate test statistic and establish the critical region. (If the decision is to be based on a P-value, it is not necessary to state the critical region.) 5. Compute the value of the test statistic from the sample data 6. Carry out the test of hypothesis and make a Decision. Reject H0 if the test statistic has a value in the critical region (or if the computed P-value is less than or equal to the desired significance level ); otherwise, do not reject H0 19 Tests of Proportions 20 Tests of Proportions Let X1, X2, . . ., Xn be a random sample of size n from B(n, p). Case 1: small sample sizes To test the Null Hypothesis H0: p = p0, a specified value, against the appropriate Alternative Hypothesis 1. HA: p < p0 , or 2. HA: p > p0 , or 3. HA: p p0 , 21 Tests of Proportions at the 100% Level of Significance, calculate the value of the test statistic using X ~ B(n, p = p0). Find the number of successes and compute the appropriate P-Value, depending upon the alternative hypothesis and reject H0 if P , where 1. P = P(X x|p = p0), or or 2. P = P(X x|p = p0), 3. P = 2P(X x|p = p0) if x < np0, or P = 2P(X x|p = p0) if x > np0, 22 Tests of Proportions Case 2: large sample sizes with p not extremely close to 0 or 1. To test the Null Hypothesis H0: p = p0, a specified value, against the appropriate Alternative Hypothesis 1. HA: p < p0 , or 2. HA: p > p0 , or 3. HA: p p0 , 23 Tests of Proportions Calculate the value of the test statistic x np 0 Z np 0 q 0 and reject H0 if 1. z z , 2. z z , 3. z z α or or 2 or z zα , 2 depending on the alternative hypothesis. 24 Example A missile manufacturer claims that the probability of success for missile MX is 0.80. To demonstrate its reliability 25 missiles are fired. If 15 are successful, do you agree with the manufacturers claim? 25 Solution We want to test H0: p=0.8 vs H1: p0.8 At the 10% level of significance (Since a value was given, I selected 10% to illustrate the process) The test statistic is X, the observed number of successes, and X~B(25,p) 26 Solution We have to determine values L and U where n x α n x PX L | p 0 p 0 1 p 0 2 x 0 x L and n x α n x PX U | p 0 p 0 1 p 0 2 x U x n Note that is we cannot find integer values of L and U, select those values of L and U which make the value of each of the summations as large as possible without exceeding /2. Now 25 x 25 x S L 0.8 0.2 0.05 x 0 x and L 25 x 25 x SU 0.8 0.2 0.05 x U x 25 27 Solution Here, L=16 for SL=0.0468 U=23 for Su=0.0274 We reject H0 if X<L or if X>U. Since X=15, we reject H0 and conclude that at the 7.42% level of significance that the manufacturer’s claim is incorrect. Note that L=17 and U=22, result in SL= 0.109 and Su=0.0982 28 Solution Using case 2, the value of the test statistic is x np0 15 25 0.8 Z 2.5 np0 q0 25 0.8 0.2 The critical region is Z< -1.64 or Z > 1.64. Since -2.5 is less than -1.64, reject H0 and conclude that the manufacturer’s claim is incorrect. 29 Example A manufacturing company has submitted a claim that 90% of items produced by a certain process are non-defective. An improvement in the process is being considered that they feel will lower the proportion of defectives below the current 10%. In an experiment 100 items are produced with the new process and 5 are defective. Is this evidence sufficient to conclude that the method has been improved? Use a 0.05 level of significance. 30 Solution Follow the six-step procedure: 1. H0: p=0.9 2. H1:p>0.9 3. =0.05 4. Critical region: Z>1.645 5. Computations: x=95, n=100, np0=(100)(0.90)=90, and 95 90 z 1.67 (100)(0.9)(0.1) 6. Conclusion: Reject H0 and conclude that the improvement has reduced the proportion of defects. 31