Hi everyone, I'd like to ask for help with this problem. I want to perform a goodness of fit test between binomial distribution and histogram with unknown parameters. My problem is, that chi2gof merges bins with count higher than 5, which should not be.
when performing goodness of fit test with other distributions than binomial everything fine. But binomial causes problems. Here is the code:
nelements=[13 18 31 32 51 52 55 53 63 38 35 24 17 17 5 11 4 4 1 2 1 0 1];
[h p stats]=chi2gof((0:(length(nelements)-1)),'NBins',length(nelements),'Frequency',nelements,'CDF',pda)
when looking at stats.O, one can see, that count at first bin is 62, but I entered 13 to the first bin and 18 to the second bin and 31 to the third bin. These three bins are merged. Similar situation is at the end, bins with count higher than 5 are merged. How to prevent this? Thank you!!!