I need to get p-value through Chi-square. My programm is:
from scipy.stats import chisquare
c = chisquare([10,4,7,5],ddof=[0,1,2,3])
print(c)
The result is:
Power_divergenceResult(statistic=3.2307692307692308, pvalue=array([ 0.35739509, 0.19881419, 0.07226674, nan]))
When I try to get p-value using table of Chi-squared values( for example from this site https://www.medcalc.org/manual/chi-square-table.php ), results are different. In this example using python p-value with degrees of freedom = 1(ddof=0) is 0.35739509 but using table p-value is 0.01. Could you please explain why results are different?