본문 바로가기

Data Science/Python

python으로 카이제곱 검정

 

python으로 One-sample 카이제곱검정을 하는 방법은 아래와 같다.

 

from scipy.stats import chisquare

chisquare(data, axis=None)

 

 

python으로 Two-sample 카이제곱검정을 하는 방법은 아래와 같다.

 

from scipy.stats import chi2_contingency

chi2_contingency(data1, correction=False)

 

 

'Data Science > Python' 카테고리의 다른 글

Python으로 하는 EDA(Exploratory Data Analysis)  (0) 2021.01.31
Python 결측치 처리  (0) 2021.01.14
Python으로 T-test  (0) 2021.01.05
matplotlib - bar chart  (0) 2021.01.05
Colab 로컬에서 파일 불러오기  (0) 2021.01.04