1 / 20

Testing Equality of Frequencies

Testing Equality of Frequencies. Chapter 9. Basic Idea. We have two categorical variables and we are interested to determine whether or not an association exist between these two variables.

barbie
Télécharger la présentation

Testing Equality of Frequencies

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Testing Equality of Frequencies Chapter 9

  2. Basic Idea • We have two categorical variables and we are interested to determine whether or not an association exist between these two variables. • Two variables are associated if the distribution of one variable tends to change with the level of the other variable.

  3. Contingency Table • Type of a table that is in a matrix format that displays the frequency distribution of the variables.

  4. Example In a study of drug usage by students at a large university, data was obtained regarding hard liquor experience of smokers and nonsmokers. In this study, the interest is whether or not liquor experience is independent of smoking. A common perception of the researcher is that those who had hard-liquor are more likely to be smokers. Test if hard liquor use is independent of smoking at alpha = 0.05

  5. Chi-Square Test of Independence • If there is association or dependence, then we would expect that more students who never had hard liquor are also non-smokers. • On the other hand, if there is no association or dependence, we would expect the same proportion of students who are nonsmokers and smokers.

  6. Test of Hypothesis • Formulate the hypotheses: Ho: The two variables are independent. H1: The two variables are associated. • Calculate the table of expected frequencies: E = expected frequency = (row total * column total)/n 3. Calculate the test statistic: where: O = observed frequency

  7. Test of Hypothesis 4. Calculate the P-value: where: df = degrees of freedom r = number of levels of the row variable c = number of levels of the column variable 5. State the decision and conclusion

  8. Example In a study of drug usage by students at a large university, data was obtained regarding hard liquor experience of smokers and nonsmokers. In this study, the interest is whether or not liquor experience is independent of smoking. A common perception of the researcher is that those who had hard-liquor are more likely to be smokers. Test if hard liquor use is independent of smoking at alpha = 0.05

  9. Example • State the Hypotheses: Ho: Hard-liquor use and smoking are independent H1: Hard-liquor use and smoking are associated. 2. Calculate the table of expected frequencies:

  10. Example 3. Calculate the Test Statistic:

  11. Example 4. Calculate the p-value:

  12. Example 5. State the decision and conclusion: Since the p-value obtained (0.000166) is less than alpha = 0.05, then we reject Ho. The data provide evidence to say that hard-liquor use and smoking are associated.

  13. Calculator • Enter the data in a matrix 2nd matrix edit choose a matrix 2. Call up the Chi-square test Stat tests X^2 test Observed: specify the matrix where you store the data Expected: specify the matrix where you want the calculator to store the expected frequencies

  14. Example A criminologist conducted a survey to determine whether the incidence of certain types of crime varied from one part of a large city to another. The particular crimes of interest were assault, burglary, larceny, and homicide. The following table shows the number of crimes committed in four areas of the city during the past year: Can we conclude from these data at a 0.1 level of significance that the occurrence of these types of crime is dependent upon the city district?

  15. Solution • State the Hypotheses: Ho: District and Type of Crime are independent. H1: District and Type of Crime are associated.

  16. Solution 2. Compute the table of expected frequencies:

  17. Solution 3. Compute the test statistic: From the calculator: Test Statistic = 124.5297

  18. Solution 4. Compute the p-value: From the Calculator: P-value = 0.0000

  19. Solution 5. State the decision and conclusion: Since p-value < 0.05, we reject Ho. District and type of crime are associated.

  20. Example • A study was made to determine whether there is a difference between the proportions of parents in the states of Maryland, Virginia, Georgia and Alabama who favor placing Bibles in the elementary schools. The responses of 100 parents selected at random in each of these states are recorded in the following table: • Is placing bible and state independent of each other? • Use =0.05 level of significance.

More Related