1
0
Fork 0
haveged/ent/examine_chi_square.R

14 lines
359 B
R
Raw Normal View History

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)