Skip to content

Instantly share code, notes, and snippets.

@MariaLavrovskaya
Created October 13, 2019 12:35
Show Gist options
  • Save MariaLavrovskaya/c8e9587b083fe6b1c97dda5dc2f2a014 to your computer and use it in GitHub Desktop.
Save MariaLavrovskaya/c8e9587b083fe6b1c97dda5dc2f2a014 to your computer and use it in GitHub Desktop.
airbnb_12
f_obs = np.array([contingency_table.iloc[0][0:4].values,
contingency_table.iloc[1][0:4].values,
contingency_table.iloc[2][0:4].values,
contingency_table.iloc[3][0:4].values,
contingency_table.iloc[4][0:4].values])
from scipy import stats
stats.chi2_contingency(f_obs)[0:3]
###В связи с этим, мы отрицаем нулевую гипотезу и принимаем альтернативную гипотезу, которая утверждает, что
###существует непосредственная взаимосвязь между расположением и типом сдаваемой недвижимости на сайте AIRBNB.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment