ChiTest = function(bin,sample) { observed <- hist(sample,breaks=seq(0,4,by=1/bin),plot=FALSE) ; return((bin/length(sample))*sum((observed$counts-length(sample