When you have completed this chapter, you will be able to: Define null and alternative hypothesis and hypothesis testing, define Type I and Type II errors, describe the five-step hypothesis testing procedure, distinguish between a one-tailed and a two-tailed test of hypothesis,...
10 1 Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved 10 2 When you have completed this chapter, you will be able to: Define null and alternative hypothesis and hypothesis testing Define Type I and Type II errors Describe the fivestep hypothesis testing procedure Distinguish between a onetailed and a twotailed test of hypothesis Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved 10 3 Conduct a test of hypothesis about a population mean Conduct a test of hypothesis about a population proportion Explain the relationship between hypothesis testing and confidence interval estimation Compute the probability of a Type II error, and power of a test Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved Terminology 10 4 Hypothesis …is a statement about a population distribution such that: (i) it is either true or false, but never both, and (ii) with full knowledge of the population data, it is possible to identify, with certainty, whether it is true or false Examples Examples …the mean monthly income for all …the mean monthly income for all systems analysts is $3569 systems analysts is $3569 …35% of all customers buying coffee …35% of all customers buying coffee at Tim Horton’s return within a week at Tim Horton’s return within a week Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved Terminology 10 5 Alternative Hypothesis H1 …is the statement that we are interested in proving It is usually a research hypothesis. Null Hypothesis H o …is the complement of the alternative hypothesis. We accept the null hypothesis as the default hypothesis. It is not rejected unless there is convincing sample evidence against it Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved Hypothesis Testing Hypothesis Testing 10 6 Step 1 Step 1 State the null and alternate hypotheses State the null and alternate hypotheses Step 2 Step 2 Select the level of significance Select the level of significance Step 3 Step 3 Identify the test statistic Identify the test statistic Step 4 Step 4 State the decision rule State the decision rule Step 5 Step 5 Compute the value of the test statistic Compute the value of the test statistic and make a decision and make a decision Do NOT reject H00 Do NOT reject H Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved Reject H0 0 and accept and accept H Reject H H11 10 7 When a decision is based on analysis of sample data and not the entire population data, it is not possible to make a correct decision all the time Our objective is to try to keep the probability of making a wrong decision as small as possible! Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved 10 8 Let’s look at the Canadian legal system for an analogy Let’s look at the Canadian legal system for an analogy Two hypotheses: 1. …the accused person is innocent 2. …the accused person is guilty After hearing from both the prosecution and the defence, After hearing from both the prosecution and the defence, a decision is made, declaring the accused either: a decision is made, declaring the accused either: Innocent! Guilty! Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved But do the courts always make the “right” decision? 10 9 Court Decision Reality Person is Person is declared ’not guilty’ Correct Decision “innocent” H0 is true Person is “guilty” H1 is true Error Type II Error Person is declared “guilty” Error Type I Error Correct Decision H0: person is innocent H1: person is guilty Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved Terminology 10 10 Level of Significance …is the probability of rejecting the null hypothesis when it is actually true, i.e. Type I Error Type II Error …accepting the null hypothesis when it is actually false Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved 10 39 1 = Confidence Interval region = rejection region Do not reject Ho when z falls in the confidence interval estimate Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved Relationship Between 10 40 Relationship Between Hypothesis Testing Procedure and Hypothesis Testing Procedure and Confidence Interval Estimation Confidence Interval Estimation Case 2: Case 2: Lowertailed test Our decision rule can be restated as: Do not reject H0 if 0 is less than or equal to the (1 ) upper confidence bound for , computed from the sample data Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved Relationship Between 10 41 Relationship Between Hypothesis Testing Procedure and Hypothesis Testing Procedure and Confidence Interval Estimation Confidence Interval Estimation 1 = confidence level region = rejection region Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved Do not reject Relationship Between 10 42 Relationship Between Hypothesis Testing Procedure and Hypothesis Testing Procedure and Confidence Interval Estimation Confidence Interval Estimation Case 3: Case 3: Uppertailed test Our decision rule can be restated as: Do not reject H0 if is greater than or equal to the (1 ) lower confidence bound for , computed from the sample data Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved 10 43 1 = acceptance region = rejection region Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved Type II Error Type II Error 10 44 Level of Significance 10 44 …is the probability of rejecting the null hypothesis when it is actually true, i.e. Type I Error Type II Error …accepting the null hypothesis when it is actually false Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved Calculating the Probability 10 45 Calculating the Probability of a Type II Error of a Type II Error 10 45 A batch of 5000 light bulbs either belong A batch of 5000 light bulbs either belong to a superior type, with a mean life of 2400 to a superior type, with a mean life of 2400 hours, or to an inferior type, hours, or to an inferior type, with a mean life of 2000 hours. with a mean life of 2000 hours. (By default, (By default, the bulbs will be sold as the the bulbs will be sold as the inferior type.) Both bulb distributions are normal, with a inferior type.) Both bulb distributions are normal, with a standard deviation of 300 hours. = 0.025. = 0.025. standard deviation of 300 hours. Suppose we select a sample of 4 bulbs. Suppose we select a sample of 4 bulbs. Find the probability of a Find the probability of a Type II error Type II error Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved Superior: =2400 Inferior: =2400 Inferior: =2000 =2000 10 46 Superior: =300 =0.025 =0.025 =300 Step 1 Step 1 State the null and alternate hypotheses State the null and alternate hypotheses Step 2 Step 2 Select the level of significance Select the level of significance Step 3 Step 3 H0: µ = 2000 H1: µ = 2400 = 0.025 Identify the test statistic Identify the test statistic As populations are normal, is known, we use the ztest Step 4 Step 4 State the decision rule State the decision rule Reject H0 if the computed z > 1.96, or stated another way, If the computed value x bar is greater than xu = 2000 +1.96(300/ n), REJECT H0 in favour of H1 Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved 10 47 Suppose H0 is false and H is false and H1 is true. is true. Suppose H 0 1 i.e. the true value of µ is 2400, i.e. the true value of µ is 2400, then x bar is approximately then x bar is approximately normally distributed with a mean of normally distributed with a mean of 2400 and a standard deviation of // n n 2400 and a standard deviation of = 300/ nn = 300/ The probability of a Type II Error …is the probability of not rejecting Ho …is the probability that the value of x bar obtained will be less than or equal to xu X Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved Xu 10 48 Suppose we select a sample of 4 bulbs. Suppose we select a sample of 4 bulbs. Then x bar has a mean of 2400 and a Then x bar has a mean of 2400 and a sd of 300/ 4 = 150 4 = 150 sd of 300/ Xu = 2000+1.96(300/ 4) = 2294 z X n 2294 300 Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved 2400 70666 A A11 = 0.2611, = 0.2611, giving us a giving us a left tail area left tail area of 0.24 of 0.24 10 49 The probability of a Type II error is 0.24 i.ei.e =0.24 =0.24 The probability of a Type II error is 0.24 Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved 10 50 ※ If we decrease the value of (alpha), the value z increases and the critical value xu moves to the right, and therefore the value of (beta) increases Conversely, if we increase the value of (alpha), xu moves to the left, thereby decreasing the value of (beta) For a given value of (alpha), the value of (beta) can be decreased by increasing the sample size Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved Power of a Test Power of a Test 10 51 … is defined as the probability of rejecting H when H0 is false, or 0 …the probability of correctly identifying a true alternative hypothesis …it is equal to (1 ) In previous example, = 0.24 = 0.24 In previous example, Therefore, the test’s power is 10.24 = 0.76 Therefore, the test’s power is 10.24 = 0.76 Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved Test your learning… … Test your learning 10 52 … … n o n o k ilcick CCl www.mcgrawhill.ca/college/lind Online Learning Centre for quizzes extra content data sets searchable glossary access to Statistics Canada’s EStat data …and much more! Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved 10 53 This completes Chapter 10 Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved ... this chapter, you will be able to: Define null and alternative hypothesis and hypothesis testing Define Type I and Type II errors Describe the fivestep hypothesis testing procedure Distinguish between a onetailed and ... hypothesis. It is not rejected unless there is convincing sample evidence against it Copyright © 2003 McGrawHill Ryerson Limited. All rights reserved Hypothesis Testing Hypothesis Testing 10 6 Step 1 Step 1 State the null and alternate hypotheses... we are interested in proving It is usually a research hypothesis. Null Hypothesis H o …is the complement of the alternative hypothesis. We accept the null hypothesis as the default hypothesis. It is not rejected unless there is