1
$\begingroup$

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: quantile plot of data and chi-square distribution

However, my output for:

ks.test(expenses, "pchisq", df=4)

is:

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?

I'm adding standard plot:standard plot

$\endgroup$
1
$\begingroup$

The general sentiment on Cross Validated is that formal goodness-of-fit testing is not helpful: either you have too few observations to reject, or you have so many that the tests become sensitive to deviations from normality that are not practically significant because your data are “close enough”. Graphical examination such as histograms, kernel density estimates, and normal quantile-quantile plots will be your friend.

It would help to give the plot of a $\chi_4^2$ density song with your density estimate, but your plot looks $\chi_4^2$-ish to me, so my interpretation is that you have a large sample size that exposes a small deviation from $\chi_4^2$ as really being there, not just an artifact of the sampling, but that it probably isn’t enough for you to care.

The concern I have is that you appear to have observations below zero. Even one such observation proves that your data do not come from $\chi_4^2$, so perhaps you have some kind of noncentral $\chi^2$ distribution.

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ Thank you for your answer. What would you recommend to do in order to prove the chi-squared distribution? It is important for me to use hypothesis test rhather than only visualising on QQ-plot. $\endgroup$ – Question May 10 at 14:55
  • $\begingroup$ The hypothesis test all but proves that your data do not come from $\chi^2_4$. The values less than zero really do prove that the data do not come from $\chi_4^2$. So what is it that you want to do? $\endgroup$ – Dave May 10 at 14:58
  • $\begingroup$ Is there a way to prove that the samples come form chi-squared distribution at all? Additionally, I am interested in the impact of negative values on non-centrality. I can't find information about it. $\endgroup$ – Question May 10 at 15:08
  • $\begingroup$ You proved that the data do not come from $\chi^2_4$; your p-value is basically zero. So what is it that you want to do? $\endgroup$ – Dave May 10 at 15:11
  • $\begingroup$ Well, I suppose I have to just accept the ejection of the null hypothesis. However, could you provide an information or a link for further reading about negative values and noncentral distribution? $\endgroup$ – Question May 10 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.