summaryrefslogtreecommitdiffstats
path: root/ent/examine_chi_square.R
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2024-11-10 15:32:30 +0100
committerDaniel Baumann <daniel@debian.org>2024-11-10 15:32:30 +0100
commit887c3b877f16e5e1b834e008306afe6677458225 (patch)
treedf0289cd7c79553a1d81310876cf48083db44239 /ent/examine_chi_square.R
parentAdding upstream version 1.9.14. (diff)
downloadhaveged-upstream.tar.xz
haveged-upstream.zip
Adding upstream version 1.9.19.upstream/1.9.19upstream
Signed-off-by: Daniel Baumann <daniel@debian.org>
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)