Skip to content

Instantly share code, notes, and snippets.

@MariaLavrovskaya
Created October 13, 2019 12:30
Show Gist options
  • Save MariaLavrovskaya/a252a1dcd20add7476e724bf3234533e to your computer and use it in GitHub Desktop.
Save MariaLavrovskaya/a252a1dcd20add7476e724bf3234533e to your computer and use it in GitHub Desktop.
airbnb_12
#Проведение теста x^2 квадрата на независимость двух переменных
##H0 - There is no statistically significant relationship between neighbourhood_group and room_type.
##H1- There is no statistically significant relationship between neighbourhood_group and room_type.
import matplotlib.pyplot as plt
import numpy as np
import math
import seaborn as sns
import pandas as pd
%matplotlib inline
contingency_table = pd.crosstab(data['neighbourhood_group'], data['room_type'], margins= True)
print(contingency_table)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment