Prev: help in NNSYSID (neural networks toolbox )
Next: how do I click a button in an Excel sheet automatically?
From: University of salzburg Robert on 4 Mar 2010 11:10 hi everyone! if have the following problem - when i use the chi2test with [h,p,st] = chi2gof(chi_vec2,'edges',edges,'expected',expectedCounts); and the bin-size (interval size) is reduced to 5, then the edges and df aren't correct. when i have 10 bins with the width of 5, e.g., then the expected and observed counts are reduced to 2 bins and i have only 1 df... strange... any suggestions? thanks in advance! robert
From: University of salzburg Robert on 5 Mar 2010 04:08 "University of salzburg Robert" <robert.fellinger(a)sbg.ac.at> wrote in message <hmom1g$h3q$1(a)fred.mathworks.com>... > hi everyone! > > if have the following problem - when i use the chi2test with > > [h,p,st] = chi2gof(chi_vec2,'edges',edges,'expected',expectedCounts); > > and the bin-size (interval size) is reduced to 5, then the edges and df aren't correct. when i have 10 bins with the width of 5, e.g., then the expected and observed counts are reduced to 2 bins and i have only 1 df... > > strange... any suggestions? > > thanks in advance! > robert i think i now the problem - chi2test isn't accurate if the interval-size is cut down below 5 - it seems that the function isn't able to work below this parameter...
From: Peter Perkins on 5 Mar 2010 13:58
On 3/5/2010 4:08 AM, University of salzburg Robert wrote: > i think i now the problem - chi2test isn't accurate if the interval-size > is cut down below 5 - it seems that the function isn't able to work > below this parameter... Robert, I'm not sure what you're referring to by "interval-size". You may be referring to a bin width, in which case I can't tell what you're describing. But you may also be referring to this behavior, as described in the help: Bins in either tail with an expected count less than 5 are pooled with neighboring bins until the count in each extreme bin is at least 5. That is to say, the chi-squared test is not at all accurate if the expected count in any bin is less than 5, and so CHI2GOF attempts to avoid that condition by pooling counts from adjacent bins. If you're seeing that, and you end up with only two bins, then it's an indication that you need more data. Hope this helps. |