16 lines
283 B
Python
16 lines
283 B
Python
from scipy.stats import chi2_contingency as chi2
|
|
import numpy as np
|
|
|
|
obs = np.array([[2887.0, 61.0], [459.0, 383.0]])
|
|
chi,p,dof,expected = chi2(obs)
|
|
print("%f, %e, %f" % (chi, p, dof))
|
|
|
|
'''
|
|
survive:
|
|
chi = 1189.5306, p = 1.149752e-260
|
|
|
|
classic:
|
|
chi = 600.7032, p = 1.177183e-132
|
|
|
|
'''
|