Chi square test in R

From Icelandic Parsed Historical Corpus (IcePaHC)
Revision as of 14:01, 7 November 2011 by Einarfs (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

data<-matrix(c(100,200,400,600),ncol=2)

data [will give:]

     [,1] [,2]
[1,]  100  400
[2,]  200  600

chisq.test(data,correct=F) [will give:]

X-squared = 4.3333, df = 1, p-value = 0.03737