scipy.stats卡方函数中的p值代表什么?

What does the p value represent in the scipy.stats chisquare function?

我正在使用 scipy.stats.chisquare 函数,如 https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.chisquare.html

中所述

我知道,一般来说,p 值表明数据支持原假设的程度。高 p 值(通常大于 0.05)表明零假设为真,反之亦然。

但是,当我的数据与预期值相似时,scipy.stats chisquare 函数的 p 值给我高 p 值,而当我的数据与预期值不同时,p 值低.

当我的数据与预期值非常相似时,我希望 p 值很小,因为这表明零假设是错误的。零假设是我的数据与预期值不相似。

这个函数中的 p 值代表什么?

答案就在您链接到的文档中:

The chi square test tests the null hypothesis that the categorical data has the given frequencies.

换句话说,零假设与你的想法相反。