Hypothesis Testing with the Chi-squared test

Introduction to Statistics in Google Sheets

Ted Kwartler

Data Dude

Applications of the chi-squared test

  • Comparing samples for meaningful differences
  • Example: Did the treatment actually work?

1 https://www.pexels.com/photo/20-mg-label-blister-pack-208512/
Introduction to Statistics in Google Sheets

Testing before and after

Two possibilities:

  • The difference in the new group stems from random sampling (H0)
  • There is in fact a meaningful difference (H1)

 

Chi-squared tests also provide a p-value

Introduction to Statistics in Google Sheets

Chi-squared test conditions

For a chi-squared test to be useful:

  • Data has to be in groups (e.g: "Old treatment", "New treatment")
  • Avoid really small expected values (< 5)
Introduction to Statistics in Google Sheets

Testing the independence of two groups

  • "Clinically proven"
  • "Lab tested"
  • Experiment needs to control for lifestyle factors
  • Compare weight within two groups
    • One treated with the supplement, and the other not
1 https://www.pexels.com/photo/woman-girl-jeans-clothes-53528/
Introduction to Statistics in Google Sheets

Chi-squared test in Google Sheets

CHITEST(observed_range, expected_range)
  • FAIL TO REJECT H0 if the p-value is greater than 0.05
  • REJECT H0 if the p-value is less than 0.05
Introduction to Statistics in Google Sheets

Let's practice!

Introduction to Statistics in Google Sheets

Preparing Video For Download...