CrashCourse · @crashcourse

Chi-Square Tests: Crash Course Statistics #29

Uploaded June 8, 2019 · Length 11:04

Chi-Square Tests: Crash Course Statistics #29

Summary

Learn how to use Chi-Square tests to compare observed data to expected data for categorical variables, covering goodness-of-fit and tests of independence.

  • chi square test
  • categorical data
  • goodness of fit
  • test of independence
  • statistical hypothesis

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:03

    Hi, I’m Adriene Hill, and welcome back to Crash Course Statistics.

  2. 0:05

    When you’re buying a new car, a new house, or a new pair of jeans, you want to make sure

  3. 0:09

    you find a good fit.

  4. 0:10

    Statistics are the same.

  5. 0:12

    You want to make sure your models or preconceptions are a good fit for the data you have.

  6. 0:16

    One way to do that is by comparing our observations to our expectations, just like we’ve done

  7. 0:22

    in statistical tests over the last couple of episodes.

  8. 0:24

    Today, we’re going to take a break from looking at continuous variables like height

  9. 0:28

    and IQ and see how we can measure the fit of categorical variables like hair color,

  10. 0:34

    or academic degree, or tax bracket.

  11. 0:37

    Turns out a chi-square model fits like that perfect pair of jeans.

  12. 0:41

    INTRO

  13. 0:50

    Back in one of our data visualization episodes, we talked about frequency tables, which tell

  14. 0:55

    you the counts--or frequencies--of different categories.

  15. 0:58

    Maybe you remember pasta madness?

  16. 1:00

    When these tables look at two different categorical variables, like favorite pasta and favorite

  17. 1:06

    pasta sauce, we often call them contingency tables or cross tabulations.

  18. 1:10

    These tables can help us understand the discrete distribution of one variable, or the relationship

  19. 1:15

    between two variables.

  20. 1:17

    Just by looking at the data we can see major differences like most people prefer red sauce....

  21. 1:22

    Or the distribution of favorite pastas seems to be different for people who like red sauce

  22. 1:27

    vs. white sauce.

  23. 1:28

    But sometimes it’s hard for us to see smaller differences, or to be sure whether differences

  24. 1:32

    we see are statistically meaningful.

  25. 1:35

    Just like when we were comparing means, we need a test.

  26. 1:38

    A statistical test that can help us extract the “signal from the noise”.

  27. 1:42

    Statistical tests usually take this form.

  28. 1:44

    And the test we’ll use here -- Chi Square -- is only slightly different from the others

  29. 1:49

    we’ve used so far.

  30. 1:50

    The idea in the numerator--looking at the difference between what we observed and what

  31. 1:54

    we’d expect if the null is true--is exactly the same.

  32. 1:58

    The denominator--average variation--is a little different.