Other ChiSquare Tests CHAPTER 11 Introduction Chisquare distribution
Other Chi-Square Tests CHAPTER 11
Introduction • Chi-square distribution can be used for tests concerning frequency distributions • Example: If a sample of buyers is given a choice of automobile colors, will each color be selected with the same frequency? • Chi-square distribution can be used to test independence of two variables • Example: Are senators’ opinions on gun control independent of party affiliations? • Chi-square distribution can be used to test homogeneity of proportions • Example: Is proportion of high school seniors who attend college immediately after graduating the same for northern, southern, eastern, and western parts of the United States?
11. 1 – Test for Goodness-of-Fit • Chi-square statistic can be used to test single variance • It can also be used to test whether frequency distribution fits specific pattern • Goodness-of-fit test • Chi-square test used to see whether frequency distribution fits specific pattern
Observed vs. Expected Frequency Cherry Strawberry Orange Lime Grape Observed 32 28 16 14 10 Expected 20 20 20 • Sample of 100 people, determining which flavor of soda they prefer • Observed frequencies • Actual frequencies from sample • Expected frequencies • Frequencies obtained by calculation (as if there were no preference)
Hypotheses • Hypotheses must be stated before computing test value • Null hypothesis should state there is no difference or no change • Alternative hypothesis would be opposite of null • For last example the hypotheses would be: • H 0 : Consumers show no preference for flavors of the fruit soda. • Ha : Consumers show a preference • Degrees of freedom • For the chi-square goodness of fit test, degrees of freedom are equal to number of categories minus 1
Formula for the Chi-Square Goodness-of. Fit Test • With degrees of freedom equal to the number of categories minus 1, and where O = observed frequency E = expected frequency
Assumptions • Two assumptions are needed for goodness-of-fit test 1. The data are obtained from a random sample 2. The expected frequency for each category must be 5 or more • This is a right-tailed test, since when O – E values are squared, they are always positive or zero
Example 11 – 1 • Is there enough evidence to reject the claim that there is no preference in the selection of fruit soda flavors, using the data shown previously? Let α = 0. 05.
Example 11 – 2 • The Russell Reynold Association surveyed retired senior executives who had returned to work. They found that after returning to work, 38% were employed by another organization, 32% were self-employed, 23% were either freelancing or consulting, and 7% had formed their own companies. To see if these percentages are consistent with those of Allegheny County residents, a local researcher surveyed 300 retired executives who had returned to work and found that 122 were working for another company, 85 were self-employed, 76 were either freelancing or consulting, and 17 had formed their own companies. At α = 0. 10, test the claim that the percentages are the same for those people in Allegheny County.
11. 2 – Tests Using Contingency Tables • When data can be tabulated in table form in terms of frequencies, several types of hypotheses can be tested by using chi-square test
Test for Independence • Independence test • Chi-square test used to determine whether two variables are independent of or related to each other when a single sample is selected • For example, suppose a new postoperative procedure is administered to patients in a large hospital. Researcher can ask question: • Do doctors feel differently about this procedure from nurses, or do they feel basically the same way?
Test for Independence cont. • Tabulate data as shown Group Prefer New Procedure Prefer Old Procedure No preference Nurses 100 80 20 Doctors 50 120 30
Hypotheses • Since main question is whethere is a difference in opinion, hypotheses are stated as follows • Null hypothesis • H 0 : The opinion about the procedure is independent of the profession • Alternative • Ha : The opinion about the procedure is dependent on the profession • If null is not rejected, then test means both professions feel basically same way and differences would be due to chance • If null is rejected, then test mean one group feels differently about procedure from the other
Contingency Table • Contingency table • Table used when data is arranged for chi-square independence test • Table is made up of r rows and c columns • Contingency table is/(can be) designated as an Rx. C (rows by columns) • This is similar to matrices and will be used in calculators for theses tests • Degrees of freedom for any contingency table are • (rows – 1) times (columns – 1) • d. f. = (r – 1)(c – 1)
Procedures for Independence and Homogeneity Tests
Assumptions for Chi-Square Independence and Homogeneity Tests 1. The data are obtained from a random sample 2. The expected value in each cell must be 5 or more If the expected values are not 5 or more, combine categories.
Example 11 – 5 • A sociologist wishes to see whether the number of years of college a person has completed is related to her or his place of residence. A sample of 88 people is selected and classified as shown. At α = 0. 05, can the sociologist conclude that a person’s location is dependent on the number of years of college? Location No college Four-year degree Advanced degree Total Urban 15 12 8 35 Suburban 8 15 9 32 Rural 6 8 7 21 Total 29 35 24 88
Test for Homogeneity of Proportions • Homogeneity of proportions test • Used to determine whether proportions for a variable are equal when several samples are selected from different populations • Sample sizes are specified in advance, making either row totals or column totals in contingency table known before samples are selected
Hypotheses • For example, researcher may select sample of 50 freshman, sophomores, juniors, and seniors then find proportion of students who are smokers in each level. Researcher will compare proportions for each group to see if they are equal. • Hypotheses should be: • H 0 : p 1 = p 2 = p 3 = p 4 • Ha : At least one proportion is different from the others • If null is not rejected, then it is assumed proportions are equal and differences in them are due to chance • If null is rejected, then it is assumed that proportions are not all equal
Example 11 – 7 • A researcher selected 100 passengers from each of 3 airlines and asked them if the airline had lost their luggage on their last flight. The data are shown in the table. At α = 0. 05, test the claim that the proportion of passengers from each airline who lost luggage on the flight is the same for each airline. Airline 1 Airline 2 Airline 3 Yes 10 7 4 21 No 90 93 96 279 Total 100 100 Total 300
- Slides: 20