CrashCourse · @crashcourse
Chi-Square Tests: Crash Course Statistics #29
Uploaded June 8, 2019 · Length 11:04
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.
- 0:03
Hi, I’m Adriene Hill, and welcome back to Crash Course Statistics.
- 0:05
When you’re buying a new car, a new house, or a new pair of jeans, you want to make sure
- 0:09
you find a good fit.
- 0:10
Statistics are the same.
- 0:12
You want to make sure your models or preconceptions are a good fit for the data you have.
- 0:16
One way to do that is by comparing our observations to our expectations, just like we’ve done
- 0:22
in statistical tests over the last couple of episodes.
- 0:24
Today, we’re going to take a break from looking at continuous variables like height
- 0:28
and IQ and see how we can measure the fit of categorical variables like hair color,
- 0:34
or academic degree, or tax bracket.
- 0:37
Turns out a chi-square model fits like that perfect pair of jeans.
- 0:41
INTRO
- 0:50
Back in one of our data visualization episodes, we talked about frequency tables, which tell
- 0:55
you the counts--or frequencies--of different categories.
- 0:58
Maybe you remember pasta madness?
- 1:00
When these tables look at two different categorical variables, like favorite pasta and favorite
- 1:06
pasta sauce, we often call them contingency tables or cross tabulations.
- 1:10
These tables can help us understand the discrete distribution of one variable, or the relationship
- 1:15
between two variables.
- 1:17
Just by looking at the data we can see major differences like most people prefer red sauce....
- 1:22
Or the distribution of favorite pastas seems to be different for people who like red sauce
- 1:27
vs. white sauce.
- 1:28
But sometimes it’s hard for us to see smaller differences, or to be sure whether differences
- 1:32
we see are statistically meaningful.
- 1:35
Just like when we were comparing means, we need a test.
- 1:38
A statistical test that can help us extract the “signal from the noise”.
- 1:42
Statistical tests usually take this form.
- 1:44
And the test we’ll use here -- Chi Square -- is only slightly different from the others
- 1:49
we’ve used so far.
- 1:50
The idea in the numerator--looking at the difference between what we observed and what
- 1:54
we’d expect if the null is true--is exactly the same.
- 1:58
The denominator--average variation--is a little different.


