InfluentialPoints.com
Biology, images, analysis, design...
Use/Abuse Principles How To Related
"It has long been an axiom of mine that the little things are infinitely the most important" (Sherlock Holmes)

Search this site

 

 

Pearson's chi square goodness of fit test - using R

Pearson's chi square goodness of fit test


Gives something like this:

> (X2 =sum((of-ef)^2/ef)) # observed value of X2 [1] 61.2771 > (df =k-1-2) # degrees of freedom [1] 18 > 1-pchisq(X2,df) # p-value [1] 1.270086e-06