Presentation is loading. Please wait.

Presentation is loading. Please wait.

© The McGraw-Hill Companies, Inc., 2000 12-1 Chapter 12 Chi-Square and Analysis of Variance (ANOVA)

Similar presentations


Presentation on theme: "© The McGraw-Hill Companies, Inc., 2000 12-1 Chapter 12 Chi-Square and Analysis of Variance (ANOVA)"— Presentation transcript:

1 © The McGraw-Hill Companies, Inc., Chapter 12 Chi-Square and Analysis of Variance (ANOVA)

2 © The McGraw-Hill Companies, Inc., Outline 12-1 Introduction 12-2 Test for Goodness of Fit 12-3 Tests Using Contingency Tables 12-4 Analysis of Variance (ANOVA)

3 © The McGraw-Hill Companies, Inc., Objectives Test a distribution for goodness of fit using chi-square. Test two variables for independence using chi-square. Test proportions for homogeneity using chi-square. Use ANOVA technique to determine a difference among three or more means.

4 © The McGraw-Hill Companies, Inc., Test for Goodness of Fit chi-square goodness-of-fit test When one is testing to see whether a frequency distribution fits a specific pattern, the chi-square goodness-of-fit test is used.

5 © The McGraw-Hill Companies, Inc., Suppose a market analyst wished to see whether consumers have any preference among five flavors of a new fruit soda. A sample of 100 people provided the following data: 12-2 Test for Goodness of Fit Test for Goodness of Fit - Example

6 © The McGraw-Hill Companies, Inc., If there were no preference, one would expect that each flavor would be selected with equal frequency. In this case, the equal frequency is 100/5 = 20. That is, approximately 20 people would select each flavor Test for Goodness of Fit Test for Goodness of Fit - Example

7 © The McGraw-Hill Companies, Inc., observed frequencies The frequencies obtained from the sample are called observed frequencies. expected frequencies The frequencies obtained from calculations are called expected frequencies. Table for the test is shown next Test for Goodness of Fit Test for Goodness of Fit - Example

8 © The McGraw-Hill Companies, Inc., Test for Goodness of Fit Test for Goodness of Fit - Example

9 © The McGraw-Hill Companies, Inc., The observed frequencies will almost always differ from the expected frequencies due to sampling error. Question: Are these differences significant, or are they due to chance? The chi-square goodness-of-fit test will enable one to answer this question Test for Goodness of Fit Test for Goodness of Fit - Example

10 © The McGraw-Hill Companies, Inc., The appropriate hypotheses for this example are: H 0 : Consumers show no preference for flavors of the fruit soda. H 1 : Consumers show a preference. The d. f. for this test is equal to the number of categories minus Test for Goodness of Fit Test for Goodness of Fit - Example

11 © The McGraw-Hill Companies, Inc., Test for Goodness of Fit Test for Goodness of Fit - Formula OE E dfnumberofcategories Oobservedfrequency E.. expected

12 © The McGraw-Hill Companies, Inc., Is there enough evidence to reject the claim that there is no preference in the selection of fruit soda flavors? Let = Step 1: Step 1: State the hypotheses and identify the claim Test for Goodness of Fit Test for Goodness of Fit - Example

13 © The McGraw-Hill Companies, Inc., H 0 : Consumers show no preference for flavors (claim). H 1 : Consumers show a preference. Step 2: Step 2: Find the critical value. The d. f. are 5 – 1 = 4 and = Hence, the critical value = Test for Goodness of Fit Test for Goodness of Fit - Example

14 © The McGraw-Hill Companies, Inc., Step 3: Step 3: Compute the test value. = (32 – 20) 2 /20 + (28 is – 20) 2 /20 + … + (10 – 20) 2 /20 = Step 4: Step 4: Make the decision. The decision is to reject the null hypothesis, since 18.0 > Test for Goodness of Fit Test for Goodness of Fit - Example

15 © The McGraw-Hill Companies, Inc., Step 5: Step 5: Summarize the results. There is enough evidence to reject the claim that consumers show no preference for the flavors Test for Goodness of Fit Test for Goodness of Fit - Example

16 © The McGraw-Hill Companies, Inc., Test for Goodness of Fit Test for Goodness of Fit - Example 9.488

17 © The McGraw-Hill Companies, Inc., The advisor of an ecology club at a large college believes that the group consists of 10% freshmen, 20% sophomores, 40% juniors, and 30% seniors. The membership for the club this year consisted of 14 freshmen, 19 sophomores, 51 juniors, and 16 seniors. At = 0.10, test the advisors conjecture Test for Goodness of Fit Test for Goodness of Fit - Example

18 © The McGraw-Hill Companies, Inc., Step 1: Step 1: State the hypotheses and identify the claim. H 0 : The club consists of 10% freshmen, 20% sophomores, 40% juniors, and 30% seniors (claim) H 1 : The distribution is not the same as stated in the null hypothesis Test for Goodness of Fit Test for Goodness of Fit - Example

19 © The McGraw-Hill Companies, Inc., Step 2: Step 2: Find the critical value. The d. f. are 4 – 1 = 3 and = Hence, the critical value = Step 3: Step 3: Compute the test value. = (14 – 10) 2 /10 + (19 – 20) 2 /20 + … + (16 – 30) 2 /30 = Test for Goodness of Fit Test for Goodness of Fit - Example

20 © The McGraw-Hill Companies, Inc., Step 4: Step 4: Make the decision. The decision is to reject the null hypothesis, since > Step 5: Step 5: Summarize the results. There is enough evidence to reject the advisors claim Test for Goodness of Fit Test for Goodness of Fit - Example

21 © The McGraw-Hill Companies, Inc., When data can be tabulated in table form in terms of frequencies, several types of hypotheses can be tested using the chi-square test. independence of variableshomogeneity of proportions Two such tests are the independence of variables test and the homogeneity of proportions test Tests Using Contingency Tables

22 © The McGraw-Hill Companies, Inc., test of independence of variables The test of independence of variables is used to determine whether two variables are independent when a single sample is selected. test of homogeneity of proportions The test of homogeneity of proportions is used to determine whether the proportions for a variable are equal when several samples are selected from different populations Tests Using Contingency Tables

23 © The McGraw-Hill Companies, Inc., Suppose a new postoperative procedure is administered to a number of patients in a large hospital. Question: Question: Do the doctors feel differently about this procedure from the nurses, or do they feel basically the same way? Data is on the next slide Test for Independence Test for Independence - Example

24 © The McGraw-Hill Companies, Inc., Test for Independence Test for Independence - Example

25 © The McGraw-Hill Companies, Inc., The null and the alternative hypotheses are as follows: independent H 0 : The opinion about the procedure is independent of the profession. dependent H 1 : The opinion about the procedure is dependent on the profession Test for Independence Test for Independence - Example

26 © The McGraw-Hill Companies, Inc., If the null hypothesis is not rejected, the test means that both professions feel basically the same way about the procedure, and the differences are due to chance. If the null hypothesis is rejected, the test means that one group feels differently about the procedure from the other Test for Independence Test for Independence - Example

27 © The McGraw-Hill Companies, Inc., Note: The rejection of the null hypothesis does not mean that one group favors the procedure and the other does not. The test value is the 2 value (same as the goodness-of-fit test value). The expected values are computed from: (row sum) (column sum)/(grand total) Test for Independence Test for Independence - Example

28 © The McGraw-Hill Companies, Inc., Test for Independence Test for Independence - Example

29 © The McGraw-Hill Companies, Inc., From the MINITAB output, the P-value = 0. Hence, the null hypothesis will be rejected. If the critical value approach is used, the degrees of freedom for the chi-square critical value will be (number of columns –1) (number of rows – 1). d.f. = (3 –1)(2 – 1) = Test for Independence Test for Independence - Example

30 © The McGraw-Hill Companies, Inc., Here, samples are selected from several different populations and one is interested in determining whether the proportions of elements that have a common characteristic are the same for each population Test for Homogeneity of Proportions

31 © The McGraw-Hill Companies, Inc., The sample sizes are specified in advance, making either the row totals or column totals in the contingency table known before the samples are selected. The hypotheses will be: H 0 : p 1 = p 2 = … = p k H 1 : At least one proportion is different from the others Test for Homogeneity of Proportions

32 © The McGraw-Hill Companies, Inc., The computations for this test are the same as that for the test of independence Test for Homogeneity of Proportions

33 © The McGraw-Hill Companies, Inc., Analysis of Variance (ANOVA) analysis of variance (ANOVA) When an F test is used to test a hypothesis concerning the means of three or more populations, the technique is called analysis of variance (ANOVA).

34 © The McGraw-Hill Companies, Inc., Assumptions for the F Test for Comparing Three or More Means The populations from which the samples were obtained must be normally or approximately normally distributed. The samples must be independent of each other. The variances of the populations must be equal.

35 © The McGraw-Hill Companies, Inc., Although means are being compared in this F test, variances are used in the test instead of the means. Two different estimates of the population variance are made Analysis of Variance

36 © The McGraw-Hill Companies, Inc., Between-group variance Between-group variance - this involves computing the variance by using the means of the groups or between the groups. Within-group variance Within-group variance - this involves computing the variance by using all the data and is not affected by differences in the means Analysis of Variance

37 © The McGraw-Hill Companies, Inc., The following hypotheses should be used when testing for the difference between three or more means. H 0 : = = … = k H 1 : At least one mean is different from the others Analysis of Variance

38 © The McGraw-Hill Companies, Inc., d.f.N. = k – 1, where k is the number of groups. d.f.D. = N – k, where N is the sum of the sample sizes of the groups. Note: The formulas for this test are tedious to work through, so examples will be done in MINITAB. See text for formulas Analysis of Variance

39 © The McGraw-Hill Companies, Inc., A marketing specialist wishes to see whether there is a difference in the average time a customer has to wait in a checkout line in three large self-service department stores. The times (in minutes) are shown on the next slide. Is there a significant difference in the mean waiting times of customers for each store using = 0.05? 12-4 Analysis of Variance Analysis of Variance -Example

40 © The McGraw-Hill Companies, Inc., Analysis of Variance Analysis of Variance -Example

41 © The McGraw-Hill Companies, Inc., Step 1: Step 1: State the hypotheses and identify the claim. H 0 : = H 1 : At least one mean is different from the others (claim) Analysis of Variance Analysis of Variance -Example

42 © The McGraw-Hill Companies, Inc., Step 2: Step 2: Find the critical value. Since k = 3, N = 18, and = 0.05, d.f.N. = k – 1 = 3 – 1= 2, d.f.D. = N – k = 18 – 3 = 15. The critical value is Step 3: Step 3: Compute the test value. From the MINITAB output, F = (See your text for computations) Analysis of Variance Analysis of Variance -Example

43 © The McGraw-Hill Companies, Inc., Step 4: Step 4: Make a decision. Since 2.70 < 3.68, the decision is not to reject the null hypothesis. Step 5: Step 5: Summarize the results. There is not enough evidence to support the claim that there is a difference among the means. The ANOVA summary table is given on the next slide Analysis of Variance Analysis of Variance -Example

44 © The McGraw-Hill Companies, Inc., Analysis of Variance Analysis of Variance -Example


Download ppt "© The McGraw-Hill Companies, Inc., 2000 12-1 Chapter 12 Chi-Square and Analysis of Variance (ANOVA)"

Similar presentations


Ads by Google