CHI SQUARE TEST OF INDEPENDENCE 1 The chi

  • Slides: 7
Download presentation
CHI SQUARE TEST OF INDEPENDENCE

CHI SQUARE TEST OF INDEPENDENCE

1 The chi- square test of independence is used to test independence of two

1 The chi- square test of independence is used to test independence of two variables 2 Suppose we want to test independence of two factors: a. Service Time b. Personally knowing someone at a bank branch 3 Data on 10000 customers is collected to find out information on the above 2 factors. 4 It is classified into a two way table called a contingency table

Test of Independence: Contingency Tables 1. Set up the null and alternative hypotheses. 2.

Test of Independence: Contingency Tables 1. Set up the null and alternative hypotheses. 2. Select a random sample and record the observed frequency, fij , for each cell of the contingency table. 3. Compute the expected frequency, eij , for each cell.

Test of Independence: Contingency Tables 4. Compute the test statistic. 5 Reject H 0

Test of Independence: Contingency Tables 4. Compute the test statistic. 5 Reject H 0 if (where is the significance level and with n rows and m columns there are (n - 1)(m - 1) degrees of freedom). NOTE: NULL HYPOTHESIS IS ALWAYS OF INDEPENDENCE OF TWO FACTORS

Example: Modern Homes (B) n Contingency Table (Independence) Test Each home sold can be

Example: Modern Homes (B) n Contingency Table (Independence) Test Each home sold can be classified according to price and to style. Modern Homes’ manager would like to determine if the price of the home and the style of the home are independent variables for purchase decisions. 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 Rs 35, 000 or less or more than Rs 35, 000. Price Colonial Ranch Split-Level A-Frame < Rs 35, 000 18 6 19 12 > Rs 35, 000 12 14 16 3

Example: Modern Homes (B) n Contingency Table (Independence) Test • Hypotheses H 0: Price

Example: Modern Homes (B) n Contingency Table (Independence) Test • Hypotheses H 0: Price of the home is independent of the style of the home that is purchased Ha: Price of the home is not independent of the style of the home that is purchased • Expected Frequencies Price Colonial Ranch Split-Level A-Frame Total < Rs 350 K 18 6 19 12 55 > Rs 350 K 12 14 16 3 45 Total 30 20 35 15 100

Example: Modern Homes (B) n Contingency Table (Independence) Test – Test Statistic =. 1364

Example: Modern Homes (B) n Contingency Table (Independence) Test – Test Statistic =. 1364 + 2. 2727 +. . . + 2. 0833 = 9. 1486 – Rejection Rule With =. 05 and (2 - 1)(4 - 1) = 3 d. f. , Reject H 0 if 2 > 7. 81 – Conclusion We reject H 0, the assumption that the price of the home is independent of the style of the home that is purchased.