With the sample size=500, I want to test whether the data follows chi-square distribution. For contiunous and one-dimensional distribution of the data, I use Kolmogorov-Smirnov test. Here I present quantile plot of data and chi-square distribution:
However, my output for:
ks.test(expenses, "pchisq", df=4)
One-sample Kolmogorov-Smirnov test data: expenses D = 0.79133, p-value < 2.2e-16 alternative hypothesis: two-sided
for $\ \alpha $ =0.05 it seems as if the null hypothesis has to be rejected. How can I interpret this result?