์นด์ด์ ๊ณฑ์ ์ ํฉ์ฑ ๊ฒ์ ๊ณผ ๋ ๋ฆฝ์ฑ ๊ฒ์ ์ ๋ฌผ์ด๋ณด๋๋ฐ ์์งํ ์ ํฉ์ฑ ๊ฒ์ ์ ๋์ฌ ํ๋ฅ ์ด ์ ์ด ๋ณด์ฌ์ ๋นผ๊ณ ์ธ์ฐ๊ฒ ์..
์ํ๊น์ง ๋จ์ ์๊ฐ ๋จ 9์๊ฐ!! ์๋๋๊ฑด ์ฌ๋ผ์
# ์ ํฉ์ฑ ๊ฒ์
from scipy.stats import chisquare
statistic,pvalue=chisquare(f_obs=f_obs,f_exp=f_exp)
# ๋
๋ฆฝ์ฑ ๊ฒ์
from scipy.stats import chi2_contigency
statistic, pvalue, dof, expected = chi2_contigency(df)
#๋ฐ์ดํฐ ํํ๊ฐ ๋ค๋ฅผ ๊ฒฝ์ฐ
table=pd.crosstab(df['์นผ๋ผ1'],df['์นผ๋ผ2'])