Skip to content

Chi-Square Goodness-of-Fit test

1 message · Ethan Johnsons

#
By looking at R thread, it seems that the approach is:

(1) cut the data into bins (you can use hist() to do this);
(2) calculate the expected numbers in each bin using the differences
of the CDF (pnorm, pexp, etc.);
(3) calculate sum((exp-obs)^2/exp);
(4) find the tail probability of the chi-square distribution (pchisq).

I am a newbie in R.  Your help will be greatly appreciated.

Thx

ej
On 12/5/06, Don McKenzie <dmck at u.washington.edu> wrote: