summaryrefslogtreecommitdiffstats
path: root/ent/examine_chi_square.R
diff options
context:
space:
mode:
Diffstat (limited to 'ent/examine_chi_square.R')
-rw-r--r--ent/examine_chi_square.R13
1 files changed, 13 insertions, 0 deletions
diff --git a/ent/examine_chi_square.R b/ent/examine_chi_square.R
new file mode 100644
index 0000000..43771fd
--- /dev/null
+++ b/ent/examine_chi_square.R
@@ -0,0 +1,13 @@
+d <- read.table('chi.txt', header = FALSE, sep = "", dec = ".")
+summary(d)
+h <- hist(d[,1],breaks=20)
+chisq.test(h$counts)
+h$counts=h$counts/sum(h$counts)
+x11()
+plot(h, col = "gray")
+curve(100/length(h$counts)*dunif(x,0,100),add=TRUE, col="red")
+x11()
+ks.test(d[,1], "punif", 0, 100)
+plot(ecdf(d[,1]))
+curve(punif(x, 0, 100), add=TRUE, col="red")
+#locator(1)