search for: j2g

Displaying 1 result from an estimated 1 matches for "j2g".

Did you mean: 2g
2009 Jul 13
0
Anomaly in sample() function
...I have computed the mean difference and the SD of the relative frequencies between sample and pop. What mean deviation is to expect? Thanks for any ideas, W. Polasek dimnames(g99)[[1]] =paste(g99[,1]) s1= g99[paste(sample(g99[,1], 100, F, g99[,4])),1:4] dim(s1) j2 =table(s1[,3]) #sample density j2g= table(g99[,3]) #pop density chisq.test(j2g,j2) p2=100*j2g / sum(j2g) #rel. frequency in pop pd=p2-100* j2/sum(j2) #difference of rel. frequency between pop and sample round(rbind(j2g, p2, pd),2) sum(abs(pd));sd(pd) #look for the 'best' representative sample