1 / 25

Qualitative data – tests of association

Qualitative data – tests of association. The Chi-Square Distribution and Test for Independence Hypothesis testing between two or more categorical variables. Sporiš Goran, PhD. http://kif.hr/predmet/mki http://www.science4performance.com/. Chi-Square Distribution.

loan
Télécharger la présentation

Qualitative data – tests of association

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. Qualitative data – tests of association The Chi-Square Distribution and Test for Independence Hypothesis testing between two or more categorical variables Sporiš Goran, PhD. http://kif.hr/predmet/mki http://www.science4performance.com/

  2. Chi-Square Distribution • The chi-square distribution results when independent variables with standard normal distributions are squared and summed.

  3. Chi-square Degrees of freedom • df = (r-1) (c-1) • Where r = # of rows, c = # of columns • Thus, in any 2x2 contingency table, the degrees of freedom = 1. • As the degrees of freedom increase, the distribution shifts to the right and the critical values of chi-square become larger.

  4. Chi-Square Test of Independence

  5. Using the Chi-Square Test • Often used with contingency tables (i.e., crosstabulations) • E.g., gender x student • The chi-square test of independence tests whether the columns are contingent on the rows in the table. • In this case, the null hypothesis is that there is no relationship between row and column frequencies. • H0: The 2 variables are independent.

  6. Requirements for Chi-Square test • Must be a random sample from population • Data must be in raw frequencies • Variables must be independent • Categories for each I.V. must be mutually exclusive and exhaustive

  7. Example Crosstab: Gender x Student Observed Expected

  8. Special Cases • Fisher’s Exact Test • When you have a 2 x 2 table with expected frequencies less than 5. • Strength of Association • Some use Cramer’s V (for any two nominal variables) or Phi (for 2 x 2 tables) to give a value of association between the variables.

  9. Two chi square tests • Goodness of fit • One variable • Determines how well the sample proportions match a pre-specified distribution • Independence • Two variables • Determines whether there is a relationship between two variables

  10. Steps in hypothesis testing • State the hypotheses • null • research • Select an alpha level and determine the critical value • Compute the test statistic • Make a decision

  11. Test for goodness of fit Forms of the null hypothesis • No preference • There is no difference in proportions among the categories • Participants do not prefer one category over another • Example: Pepsi: 50%, Coke 50% • No difference from a comparison population • There is no difference between the sample distribution and a known (population) distribution • Example: ND: 20% Bl, 75% Br, 5% R US: 20% Bl, 75% Br, 5% R

  12. Test for goodness of fit • Null hypothesis • Specifies a distribution of proportions • Research hypothesis • Specifies that the distribution will be different than that indicated in the null hypothesis

  13. Calculating the test statistic • Observed frequencies • the number of individuals from the sample who are classified in a particular category • fo • Expected frequencies • the number of individuals from the sample who are expected to be classified in a particular category • fe

  14. Calculating the test statistic Coin flip: What percentage of people will predict heads? tails?

  15. Calculating the test statistic • Expected frequency = fe = pn • n = 50 (sample size) • fe = .5 x 50 = 25

  16. n = 50 Question: The last five flips were tails. What do you predict for the next flip? Calculating the test statistic

  17. Calculating the test statistic x2 = ∑(fo - fe)2 fe Steps find the difference between fo and fe for each category square the difference divide the squared difference by fe sum the values from all categories

  18. x2 = ∑(fo - fe)2 = 4 + 4 = 8 fe

  19. Chi square distribution Critical range 0 x2 Low chi square Hi chi square

  20. Critical values for chi square distribution Table B.8

  21. Test for goodness of fit • The greater the number of categories, the greater the likelihood of a large observed chi square value • Degrees of freedom (df) • The number of values that are free to vary • df = C – 1 • C = the number of categories

  22. Chi square distribution

  23. Critical values for chi square distribution

  24. Chi square distribution 5% 0 3.84 x2 Critical value (df = 1,  = .05) = 3.84

  25. Goodness of fit • Make a decision • Critical value = 3.84 with df = 1 and  = .05. • Observed chi square = 8.0 • 8.0 > 3.84 • Observed chi square is greater than critical value • We reject the null hypothesis • Conclude that category frequencies are different • People were more likely to predict heads than tails

More Related