Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 1 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole.

Similar presentations


Presentation on theme: "1 1 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole."— Presentation transcript:

1 1 1 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. Slides by John Loucks St. Edward’s University

2 2 2 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. Chapter 12 Tests of Goodness of Fit and Independence n Goodness of Fit Test: A Multinomial Population Goodness of Fit Test: Goodness of Fit Test: Poisson and Normal Distributions Test of Independence Test of Independence

3 3 3 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. Hypothesis (Goodness of Fit) Test for Proportions of a Multinomial Population 1. State the null and alternative hypotheses. H 0 : The population follows a multinomial distribution with specified probabilities distribution with specified probabilities for each of the k categories for each of the k categories H 0 : The population follows a multinomial distribution with specified probabilities distribution with specified probabilities for each of the k categories for each of the k categories H a : The population does not follow a multinomial distribution with specified multinomial distribution with specified probabilities for each of the k categories probabilities for each of the k categories H a : The population does not follow a multinomial distribution with specified multinomial distribution with specified probabilities for each of the k categories probabilities for each of the k categories

4 4 4 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. Hypothesis (Goodness of Fit) Test for Proportions of a Multinomial Population 2. Select a random sample and record the observed frequency, f i, for each of the k categories. frequency, f i, for each of the k categories. 3. Assuming H 0 is true, compute the expected frequency, e i, in each category by multiplying the frequency, e i, in each category by multiplying the category probability by the sample size. category probability by the sample size.

5 5 5 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. Hypothesis (Goodness of Fit) Test for Proportions of a Multinomial Population 4. Compute the value of the test statistic. Note: The test statistic has a chi-square distribution with k – 1 df provided that the expected frequencies are 5 or more for all categories. Note: The test statistic has a chi-square distribution with k – 1 df provided that the expected frequencies are 5 or more for all categories. f i = observed frequency for category i e i = expected frequency for category i k = number of categories where:

6 6 6 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. Hypothesis (Goodness of Fit) Test for Proportions of a Multinomial Population where  is the significance level and there are k - 1 degrees of freedom p -value approach: Critical value approach: Reject H 0 if p -value <  5. Rejection rule: Reject H 0 if

7 7 7 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. Multinomial Distribution Goodness of Fit Test n Example: Finger Lakes Homes (A) Finger Lakes Homes manufactures four models of Finger Lakes Homes manufactures four models of prefabricated homes, a two-story colonial, a log cabin, a split-level, and an A-frame. To help in production planning, management would like to determine if previous customer purchases indicate that there is a preference in the style selected.

8 8 8 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. Split- A- Split- A- Model Colonial Log Level Frame # Sold The number of homes sold of each model for 100 The number of homes sold of each model for 100 sales over the past two years is shown below. Multinomial Distribution Goodness of Fit Test n Example: Finger Lakes Homes (A)

9 9 9 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. n Hypotheses Multinomial Distribution Goodness of Fit Test where: p C = population proportion that purchase a colonial p C = population proportion that purchase a colonial p L = population proportion that purchase a log cabin p L = population proportion that purchase a log cabin p S = population proportion that purchase a split-level p S = population proportion that purchase a split-level p A = population proportion that purchase an A-frame p A = population proportion that purchase an A-frame H 0 : p C = p L = p S = p A =.25 H a : The population proportions are not p C =.25, p L =.25, p S =.25, and p A =.25 p C =.25, p L =.25, p S =.25, and p A =.25

10 10 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. n Rejection Rule 22 2 Do Not Reject H 0 Reject H 0 Multinomial Distribution Goodness of Fit Test With  =.05 and k - 1 = = 3 k - 1 = = 3 degrees of freedom degrees of freedom if p -value Reject H 0 if p -value

11 11 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. n Expected Frequencies n Test Statistic Multinomial Distribution Goodness of Fit Test e 1 =.25(100) = 25 e 2 =.25(100) = 25 e 3 =.25(100) = 25 e 4 =.25(100) = 25 e 3 =.25(100) = 25 e 4 =.25(100) = 25 = = 10

12 12 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. Multinomial Distribution Goodness of Fit Test n Conclusion Using the p -Value Approach The p -value < . We can reject the null hypothesis. The p -value < . We can reject the null hypothesis. Because  2 = 10 is between and , the Because  2 = 10 is between and , the area in the upper tail of the distribution is between area in the upper tail of the distribution is between.025 and and.01. Area in Upper Tail  2 Value (df = 3) Actual p -value is.0186

13 13 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. n Conclusion Using the Critical Value Approach Multinomial Distribution Goodness of Fit Test We reject, at the.05 level of significance, We reject, at the.05 level of significance, the assumption that there is no home style preference.  2 = 10 > 7.815

14 14 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. Test of Independence: Contingency Tables 1. Set up the null and alternative hypotheses. 2. Select a random sample and record the observed frequency, f ij, for each cell of the contingency table. frequency, f ij, for each cell of the contingency table. 3. Compute the expected frequency, e ij, for each cell. H 0 : The column variable is independent of the row variable the row variable H 0 : The column variable is independent of the row variable the row variable H a : The column variable is not independent of the row variable of the row variable H a : The column variable is not independent of the row variable of the row variable

15 15 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. Test of Independence: Contingency Tables 5. Determine the rejection rule. Reject H 0 if p -value <  or. 4. Compute the test statistic. where  is the significance level and, with n rows and m columns, there are ( n - 1)( m - 1) degrees of freedom.

16 16 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. Each home sold by Finger Lakes Homes can be Each home sold by Finger Lakes Homes can be classified according to price and to style. Finger Lakes’ manager would like to determine if the price of the home and the style of the home are independent variables. Contingency Table (Independence) Test n Example: Finger Lakes Homes (B)

17 17 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. Price Colonial Log Split-Level A-Frame Price Colonial Log Split-Level A-Frame The number of homes sold for each model and The number of homes sold for each model and price for the past two years is shown below. For convenience, the price of the home is listed as either $99,000 or less or more than $99,000. > $99, < $99, Contingency Table (Independence) Test n Example: Finger Lakes Homes (B)

18 18 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. n Hypotheses Contingency Table (Independence) Test H 0 : Price of the home is independent of the style of the home that is purchased style of the home that is purchased H a : Price of the home is not independent of the style of the home that is purchased style of the home that is purchased

19 19 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. n Expected Frequencies Contingency Table (Independence) Test Price Colonial Log Split-Level A-Frame Total Price Colonial Log Split-Level A-Frame Total < $99K > $99K Total Total

20 20 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. n Rejection Rule Contingency Table (Independence) Test With  =.05 and (2 - 1)(4 - 1) = 3 d.f., Reject H 0 if p -value = = n Test Statistic

21 21 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. n Conclusion Using the p -Value Approach The p -value < . We can reject the null hypothesis. The p -value < . We can reject the null hypothesis. Because  2 = is between and 9.348, the Because  2 = is between and 9.348, the area in the upper tail of the distribution is between area in the upper tail of the distribution is between.05 and and.025. Area in Upper Tail  2 Value (df = 3) Contingency Table (Independence) Test Actual p -value is.0274

22 22 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. n Conclusion Using the Critical Value Approach Contingency Table (Independence) Test We reject, at the.05 level of significance, We reject, at the.05 level of significance, the assumption that the price of the home is independent of the style of home that is purchased.  2 = > 7.815

23 23 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. Goodness of Fit Test: Poisson Distribution 1. State the null and alternative hypotheses. 2. Select a random sample and a. Record the observed frequency f i for each value of a. Record the observed frequency f i for each value of the Poisson random variable. the Poisson random variable. b. Compute the mean number of occurrences . b. Compute the mean number of occurrences . H 0 : The population has a Poisson distribution H a : The population does not have a Poisson distribution

24 24 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. Goodness of Fit Test: Poisson Distribution 3. Compute the expected frequency of occurrences e i for each value of the Poisson random variable. for each value of the Poisson random variable. Multiply the sample size by the Poisson probability Multiply the sample size by the Poisson probability of occurrence for each value of the Poisson random of occurrence for each value of the Poisson random variable. variable. If there are fewer than five expected occurrences If there are fewer than five expected occurrences for some values, combine adjacent values and for some values, combine adjacent values and reduce the number of categories as necessary. reduce the number of categories as necessary.

25 25 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. Goodness of Fit Test: Poisson Distribution 4. Compute the value of the test statistic. f i = observed frequency for category i e i = expected frequency for category i k = number of categories where:

26 26 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. where  is the significance level and there are k - 2 degrees of freedom there are k - 2 degrees of freedom p -value approach: Critical value approach: Reject H 0 if p -value <  5. Rejection rule: Reject H 0 if Goodness of Fit Test: Poisson Distribution

27 27 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. n Example: Troy Parking Garage In studying the need for an additional entrance to In studying the need for an additional entrance to a city parking garage, a consultant has recommended an analysis approach that is applicable only in situations where the number of cars entering during a specified time period follows a Poisson distribution. Goodness of Fit Test: Poisson Distribution

28 28 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. A random sample of 100 one-minute time intervals A random sample of 100 one-minute time intervals resulted in the customer arrivals listed below. A statistical test must be conducted to see if the assumption of a Poisson distribution is reasonable. Goodness of Fit Test: Poisson Distribution n Example: Troy Parking Garage # Arrivals Frequency

29 29 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. n Hypotheses H a : Number of cars entering the garage during a one-minute interval is not Poisson distributed one-minute interval is not Poisson distributed H 0 : Number of cars entering the garage during a one-minute interval is Poisson distributed a one-minute interval is Poisson distributed Goodness of Fit Test: Poisson Distribution

30 30 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. n Estimate of Poisson Probability Function  otal Arrivals = 0(0) + 1(1) + 2(4) (1) = 600 Hence, Estimate of  = 600/100 = 6 Total Time Periods = 100 Goodness of Fit Test: Poisson Distribution

31 31 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. n Expected Frequencies x f ( x ) nf ( x ) Total x f ( x ) nf ( x ) Goodness of Fit Test: Poisson Distribution

32 32 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. n Observed and Expected Frequencies i f i e i f i - e i i f i e i f i - e i or 1 or or more Goodness of Fit Test: Poisson Distribution

33 33 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. n Test Statistic With  =.05 and k - p - 1 = = 7 d.f. With  =.05 and k - p - 1 = = 7 d.f. (where k = number of categories and p = number of population parameters estimated), Reject H 0 if p -value n Rejection Rule Goodness of Fit Test: Poisson Distribution

34 34 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. n Conclusion Using the p -Value Approach The p -value > . We cannot reject the null hypothesis. There is no reason to doubt the assumption of a Poisson distribution. The p -value > . We cannot reject the null hypothesis. There is no reason to doubt the assumption of a Poisson distribution. Because  2 = is between and in the Chi-Square Distribution Table, the area in the upper tail Because  2 = is between and in the Chi-Square Distribution Table, the area in the upper tail of the distribution is between.90 and.10. Area in Upper Tail  2 Value (df = 7) Goodness of Fit Test: Poisson Distribution Actual p -value is.8591

35 35 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. Goodness of Fit Test: Normal Distribution 1. State the null and alternative hypotheses. 3.Compute the expected frequency, e i, for each interval. (Multiply the sample size by the probability of a (Multiply the sample size by the probability of a normal random variable being in the interval. normal random variable being in the interval. 2. Select a random sample and a. Compute the mean and standard deviation. b. Define intervals of values so that the expected frequency is at least 5 for each interval. frequency is at least 5 for each interval. c. For each interval, record the observed frequencies H 0 : The population has a normal distribution H a : The population does not have a normal distribution

36 36 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. 4. Compute the value of the test statistic. Goodness of Fit Test: Normal Distribution 5. Reject H 0 if (where  is the significance level and there are k - 3 degrees of freedom). and there are k - 3 degrees of freedom).

37 37 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. n Example: IQ Computers IQ Computers (one better than HP?) manufactures IQ Computers (one better than HP?) manufactures and sells a general purpose microcomputer. As part of a study to evaluate sales personnel, management wants to determine, at a.05 significance level, if the annual sales volume (number of units sold by a salesperson) follows a normal probability distribution. Goodness of Fit Test: Normal Distribution

38 38 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. A simple random sample of 30 of the salespeople was taken and their numbers of units sold are listed below. n Example: IQ Computers (mean = 71, standard deviation = 18.54) Goodness of Fit Test: Normal Distribution

39 39 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. n Hypotheses H a : The population of number of units sold does not have a normal distribution with does not have a normal distribution with mean 71 and standard deviation mean 71 and standard deviation H 0 : The population of number of units sold has a normal distribution with mean 71 has a normal distribution with mean 71 and standard deviation and standard deviation Goodness of Fit Test: Normal Distribution

40 40 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. n Interval Definition To satisfy the requirement of an expected To satisfy the requirement of an expected frequency of at least 5 in each interval we will divide the normal distribution into 30/5 = 6 equal probability intervals. Goodness of Fit Test: Normal Distribution

41 41 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. n Interval Definition Areas = 1.00/6 =.1667 Areas = 1.00/6 = .43(18.54) = = (18.54) Goodness of Fit Test: Normal Distribution

42 42 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. n Observed and Expected Frequencies Less than to to to to to to to to More than i f i e i f i - e i i f i e i f i - e i Total Goodness of Fit Test: Normal Distribution

43 43 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. n Test Statistic With  =.05 and k - p - 1 = = 3 d.f. With  =.05 and k - p - 1 = = 3 d.f. (where k = number of categories and p = number of population parameters estimated), Reject H 0 if p -value n Rejection Rule Goodness of Fit Test: Normal Distribution

44 44 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. n Conclusion Using the p -Value Approach The p -value > . We cannot reject the null hypothesis. There is little evidence to support rejecting the assumption the population is normally distributed with  = 71 and  = The p -value > . We cannot reject the null hypothesis. There is little evidence to support rejecting the assumption the population is normally distributed with  = 71 and  = Because  2 = is between.584 and in the Chi-Square Distribution Table, the area in the upper tail Because  2 = is between.584 and in the Chi-Square Distribution Table, the area in the upper tail of the distribution is between.90 and.10. Area in Upper Tail  2 Value (df = 3) Goodness of Fit Test: Normal Distribution Actual p -value is.6594

45 45 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. or duplicated, or posted to a publicly accessible website, in whole or in part. End of Chapter 12


Download ppt "1 1 Slide © 2011 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole."

Similar presentations


Ads by Google