I am using the scipy.stats.chisquare function, as explained on https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.chisquare.html
I understand that, in general, the p-value demonstrates how well the data supports the null hypothesis. A high p-value, usually greater than 0.05, suggests that the null hypothesis is true, and vice versa.
However, the p-value of the scipy.stats chisquare function gives me high p-values when my data is similar to the expected values, and low p-values when my data is different from the expected values.
I am expecting the p-value to be small when my data closely resembles the expected values as this would indicate that the null hypothesis is false. The null hypothesis being that my data does not resemble the expected values.
What does the p-value represent in this function?