Skip to content

Basic general statistical problem.

2 messages · Fulvio Copex, Brian Ripley

#
On Sat, 28 Feb 2004, Fulvio Copex wrote:

            
Isn't this about statistics beginners?  You seem to be assuming univariate 
data and a very specific distribution form.  There are standard 
procedures, but yours seems erroneous.
The counts are jointly multinomial.  Approximately each count is 
Poisson-distributed, so the standard deviation is approximately the square 
root of the count.  (You seem to be assuming that at 3).)
What does that mean?  The histogram is a density estimate, and 
theoretically a pdf cannot be linear unless you restrict the range, and 
even then you would want to constrain the estimation.  You want to the fit 
the pdf to the actual data, not grouped data, if you can.
That is not a correct test, as the counts are not independent (they must 
sum to one).  I presume you have a typo: it is (o-e)^2/e, where I think e 
and w are probably the same thing.

You can use chisq.test to do the correct test.
No, you need to refer the correct statistic to a proper chi-squared
distribution.  If you fit parameters of the distribution, the theory
assumes that you fitted them by maximum-likelihood (to the grouped data).
No.
?fitdistr (in MASS) for how to fit univariate distributions, and ?density
for how to find non-parametric density estimates.  ?chisq.test for
Chi-squared test of goodness of fit.  library(stepfun); ?ecdf for other
ways to examine data, and ?ks.test for other fit statistics which may be
more appropriate for continuous univariate measurements.
This sort of thing is covered in most introductory statistics classes and 
texts.   I think you need to seek the advice of a local statistical 
consultant.