Pearson's Chi Square Test Python

六月ゝ 毕业季﹏ 提交于 2019-12-04 20:24:32

In general, the null hypothesis(H0) says that the two variable(X and Y) are independent, i.e. changing values in X wouldn't affect values in Y.

For example, X = [1,2,3,4] and Y = [2,4,6,8]

If you calculate the "p-value" using any method out there for this case, it should come out to be a very small value, implying that there is a very low chance of this case following the null hypothesis, i.e. a very low chance that X and Y are independent of each other.

It means it will never follow the Null Hypothesis here and these two variables are dependent on each other, in a form of Y = 2X.

In your case also, p-value score of 9.0718379533890424e-44 means the same thing, i.e. small value indicates that there is a very low chance it would suffice the null hypothesis and it means that observed and expected are related to each other and there is no independence between them.

Ps. You are correct about this.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!