開始使用免費開始

Are gender and number of roommates independent?

As it turns out, the dating website also has information on gender and the number of roommates each profile has, so let's "pivot" for a moment and explore whether the two are independent using a chi-squared independence test.

Although you believe age and roommates could be related, you suspect that gender has no impact on the number of roommates.

On the right is a frequency pivot table from 200 profiles. Check out DataCamp’s Pivot Tables in Google Sheets learn all about pivot tables. Your hypotheses:

H0: The `roommates` & `gender` variables are independent
H1: The `roommates` & `gender`  variables are not independent

Assume a 0.05 p-value cutoff. As a refresher, if the p-value result is less than the significance level (0.05), you can reject the null hypothesis.

本練習屬於課程

Google Sheets 統計學入門

檢視課程

練習說明

  • In K2, conduct a chi-squared test by passing in the observed range B3:C7 and then the expected range 'G3:H7' to get the p-value.
  • Enter REJECT or FAIL TO REJECT demonstrating your interpretation of the test.

動手互動練習

將理論付諸實踐,立即體驗我們的互動練習

開始練習