开始使用免费开始使用

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.

动手互动练习

通过我们的互动练习之一,将理论转化为实践

开始练习